Help with complicated(?) Range

H

Haxer

I am trying to cut information from a known set of columns (A:Q) with a
variable row and move them to a known set of columns (A:Q) with a variable
row. I think it should look something like this:

Sheets("Deleted").Range("A" &
xLastRow&:"Q"&xLastRow)=Sheets("Data").Range("A" & i:"Q"&i)

Actually what I have above is when I was trying to copy. I am no longer
trying to copy but actually cut and paste.

Any help please?
 
T

Tim

Try to add this line to your code:

Sheets("Deleted").Range("A" &
xLastRow&:"Q"&xLastRow).ClearContents

Tim
 
H

Haxer

VBA doesn't like the : in the statement you gave me. Typo or any other ideas?
Thanks.
 
H

Haxer

This seems to have gotten a little off what I am trying to do. But I have
used what you have given me to make this line:

Sheets("Deleted").Rows(xLastRow) = Sheets("Data").Range("A" & iLastRow &
":Q" & iLastRow).Value

Which looks like what I want it to do except it doesn't seem to do anything.
No information is copied. Can you Please HELP?
Thanks alot
 
T

Tim

Try to change your code to this:
Sheets("Data").Rows(xLastRow) = Sheets("Deleted").Range("A" & iLastRow &
":Q" & iLastRow).Value

Tim
 
H

Haxer

Sorry, it still does the same thing, nothing! Thanks for the help though. I'm
pulling my hair out here! Anymore ideas feel free to pass them my way!
Thanks again
 
T

Tim

One more try:

Sheets("Data").Range("A" & iLastRow & ":Q" & iLastRow).Value =
Sheets("Deleted").Rows(xLastRow)

Tim
 
Top