Cut & Paste Need Special Macro
Sorry Dave can't seem to get it to work. I am not that great with Macros. But
thanks for your help I'll keep plugging along.
--
Miss Kitty
"Dave Peterson" wrote:
Maybe you could loop through D2:D15 looking for a match for that specific name.
Then copy to the "do not call list" worksheet:
dim DestCell as range
dim myCell as range
dim myRng as range
dim myStr as string
mystr = lcase("Some String to match here")
with worksheets("Canvassers"
set myrng = .range("d2:D15")
end with
for each mycell in myrng.cells
if lcase(mycell.value) = mystr then
with worksheets("do not call list")
set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with
mycell.entirerow.copy _
destination:=destcell
end if
next mycell
(Uncompiled, untested--watch for typos.)
Miss Kitty wrote:
I have been searching for days on how I can get a macro to copy/cut a row
from one spreadsheet and paste it into another automatically or even when I
run a Macro. The information will come from a validation list with specific
names. This is what I have so far;
With Sheets ("Canvassers")
.Range("D2:N15").Copy Destination: Sheets ("DO NOT CALL List").Range ("A2"
End With
My D column has the validation list in it and I have left my other sheet
completely blank except for a header.
This is working correctly but I seem to be missing something. I need it to
copy/cut ONLY the entire row that has only 1 specific validation name. This
copies/cuts the entire range no matter whats in the validation list.
I welcome anyone's expertise it will be much appreciated!
--
Miss Kitty
--
Dave Peterson
|