Help Required Please! Copy data from one sheet to another when criteria are matched.

Mr B J B

New Member
Joined
Dec 11, 2018
Messages
9
Hi,

I currently have some excel formulas in Sheet "A" which pull data from Sheet "B" but I need to rewrite this in VBA code so that the information that is pulled through is permanent and does not disappear when the data in Sheet "B" changes. But I'm struggling with putting the VBA code together, so would appreciate your help!

So currently I have IndexMatch formulas to match data in Sheet "A" cells in column Y to data in Sheet "B" cells in column C, starting from Y3 and cycling down to Y10000. If a match is found the formula then pulls through data from corresponding cells of matched row in:

Sheet "B" in column C to matched row in Sheet "A" column AJ
Sheet "B" in column E to matched row in Sheet "A" column AL

Example of formula:


=IF(Y3<>"",INDEX('Worksheet B'!C:C,MATCH('Worksheet A'!Y3,'Worksheet B'!C:C,0)),"")

I am also validating data in Sheet "B"column K with corresponding row in Sheet "A" column Z which returns a simple YES or NO if there is a match or not.

Example of formula:

=IF((INDEX('Worksheet B'!K:K,MATCH('Worksheet A'!Y3,'Worksheet B'!C:C,0)))=Z:Z,"YES","NO")

Many thanks in advance for your help :)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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