Moving entire rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Howdy,

First of all, I did search topics and attempt a solution listed before
posting, so I feel slightly vindicated, if not accomplished.

Within a macro, I'm comparing the values from 2 sheets. Among other things,
when equivalency is found, I'd lik to copy the entire row of the active cells
(all within the same row) to a third sheet.

I tried the following:

Worksheets("Third").Cells(Row variable, 1).EntireRow = Cells(Row
variable2,1).EntireRow.Copy

That didn't work, so I came here and searched for a solution that led me to
try:

Cells(Row variable2,1).EntireRow.Copy Destination :=
Worksheets("Third").EntireRow

Oddly enough, all I got from that attempt was, seemingly, the boolean result
of the equivalency test, as all cells in the destination row were filled with
"TRUE", but I've no real clue how that result was generated.

Any help would be greatly appreciated. Thanks a bunch.

Paul
 
pvdalen,

Try something like this:


Cells(Row variable2,1).EntireRow.Copy Destination :=
Worksheets("Third").Range("A5")

Hope this gets you in the right direction.

Charle
 
Try this:
Cells(SourceRow, 1).EntireRow.Copy
Worksheets("Third").Cells(DestRow, 1).PasteSpecial xlPasteFormulas,
xlPasteSpecialOperationNone
If the result is not exactly what you intended, try changing xlPasteFormulas
to xlPasteValues or any of the other possible settings. You may want to
experiment a bit to see how each works.

HTH
Chris
 

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

Back
Top