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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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