copy and paste to another sheet based in cell color
It might be easier to just loop through each row and use the same conditions
to determine what to do.
(pseudo code)
For rw = 1 to lastrow
if cells(rw,4) = condition1 then
' your code
elseif cells(rw,5)=condition2 then
' your code
else
' anyother code you want
end if
next
for copying -
Sheets("MP").Range(????)=Sheets("MySheet").Range(r w,2)
or
Sheets("MP").Range(????).value=Sheets("MySheet").R ange(rw,2).value
or
Sheets("MP").Range(????).text=Sheets("MySheet").Ra nge(rw,2).text
the trick is to define lastrow, and to define the row to paste to...
write back if you need more...
--
steveB
Remove "AYN" from email to respond
"nat3ten" wrote in message
ups.com...
I am trying to write code which will automate a long process. If cells
in columns D or E are red(3) or gold(44), I want it to copy the info in
coulmn B (in the corresponding row)to another sheet called 'MP.' Is
there a way to do this?
Also, I thought I might note that the cells in columns D and E are red
or gold due to conditional formatting.
Thanks.
|