Excel VBA Loop column and copy data

atame

New Member
Joined
May 26, 2015
Messages
31
I need some help with a bit of code i'm trying to write. I am not very experienced in VBA, I thought a VLookup is what i needed but after thinking about it. I think a Find loop with work even better.
There will be a button click on sheet1.
The code will need to do the following, in sheet "Global" use column B and search range, each row will have a different value, it will need to search the cell value row by row, in Sheet "Details" if match found then copy the data from columns H, F & E and paste into columns O, P & Q in the Global sheet. H = O, E = P, D = Q. Loop through until first empty row.
In the Details sheet, in column B if there was no data matching from Details then the row will get deleted.
For Example:
Global Before:
k79Zb.jpg

Details Before:
0kmFu.jpg

After Code has run:
Global After:
YCwZ6.jpg

Details After:
O3y6V.jpg

Hopefully this explains it well enough, as you can seen it has found the matching data and copied it to the relevant rows, all non matching data has been deleted.
I have no code at the moment because if i honest i have no idea where to start!!! All help is much appreciated!!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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