If found, then copy and paste contents, otherwise move on

A

Annette

I want to be able to find data that varies each month but I am able to
provide a standard. What I need the macro to do is look at the raw data
found on sheet 1 and if the characters DRP1 (for example) are found in a
cell in column 1, then copy the three ajacent cells to the right and paste
into the master sheet next to DRP1, else nothing.

For example:

(raw data)
DRPA 148 761 333 1,242
DRPI 41 54 12 107

(master sheet)
DRPA 148
761
333

DRPB (nothing)
DRPC (nothing)
DRPI 41
54
12

I hope this makes sense as I have over 1,000 to loop through.
 
D

Dave Peterson

How about applying Data|filter|autofilter, then filter (custom?) for what you
want.

Then copy those visible cells and paste them where you want them.
 
A

Annette

Well ... all I want to have to do is paste raw data into the sheet, and run
a macro so that it carries to the master so that it will link into another
existing spreadsheet. Does that make sense? So the filter won't work.
 
D

Dave Peterson

Yeah, it makes sense.

But it also makes sense to apply the filter and copy all the rows that match in
one fell swoop to its new location. (well, it does to me.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top