ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rows().value (https://www.excelbanter.com/excel-programming/290493-rows-value.html)

Greg Carter

rows().value
 
My code has these 3 lines to swap rows.

Rows(120).Value = Rows(z).Value

Rows(z).Value = Rows(x).Value

Rows(x).Value = Rows(120).Value

Is this the only way to do it?

Also, the formulas are destroyed when using this, and

I need to retain them.

Thanx ahead,
Greg Carter

Bob Phillips[_6_]

rows().value
 
Hi Greg,

Try this

Rows(120).Copy
Rows(z).PasteSpecial Paste:=xlAll
Application.CutCopyMode = False


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"greg carter" wrote in message
...
My code has these 3 lines to swap rows.

Rows(120).Value = Rows(z).Value

Rows(z).Value = Rows(x).Value

Rows(x).Value = Rows(120).Value

Is this the only way to do it?

Also, the formulas are destroyed when using this, and

I need to retain them.

Thanx ahead,
Greg Carter





All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com