Refresh Data So it can get duplicated

bobby786

Board Regular
Joined
Apr 24, 2014
Messages
87
Office Version
  1. 2016
Platform
  1. Windows
Dear All ,

I have the following code on my Sheet named (CENTRAL) , purpose of this code to sync some data to other sheet named as (Materials) , for code credit goes to forum members who helped me , thank you again.


VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

'This will duplicate values to QC sheet
If Not Target.Column > 11 Then
    Sheets("QC").Range(Target.Address) = Target.Value2
End If

'This will duplicate values to Materials Sheet
If Not Target.Column > 6 Then
    Sheets("Materials").Range(Target.Address) = Target.Value2
End If

 End Sub

Now i have CENTRAL Sheet with 100's of entries , one way i found is going to each cell and press F2 in this way it can get sync to Material corresponding Cell , but its a time taking work , i am looking if i can automate this ?

thanks in advance for anyone who help me .

Regards
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
This is untested:
Select the cells with 100's of entries > Copy > Paste it back
VBA Code:
    If Not Target.Column > 6 Then
        
        Dim c As Range
        Application.EnableEvents = False
        
        For Each c In Target
              Sheets("Materials").Range(c.Address) = c.Value2
        Next
        
        Application.EnableEvents = True
        
    End If
 
Upvote 0
Solution
This is untested:
Select the cells with 100's of entries > Copy > Paste it back
VBA Code:
    If Not Target.Column > 6 Then
       
        Dim c As Range
        Application.EnableEvents = False
       
        For Each c In Target
              Sheets("Materials").Range(c.Address) = c.Value2
        Next
       
        Application.EnableEvents = True
       
    End If
Thank you for the solution
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top