copy row based on cell value

dshafique

Board Regular
Joined
Jun 19, 2017
Messages
171
hey guys!, so i was having trouble figuring out a formula in vba which copies a whole row to a different sheet.

for example, I have a list of names and data in a sheet called "data" what I want it to do is

1.) check the names in column 4 against data in column 4 of a different sheet called "yesterday"
2.) if the name is there, insert a blank row under the row in "data" and then copy the whole row with the name in it from "yesterday" into that blank row
3.) if the name isn't there, then I want to still add a blank row, but I want to blacken it out.

maybe there's a better way to do this, I am open to suggestions. I have a sample outcome if attaching that helps. Thanks!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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