ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying an entire row of formulas (https://www.excelbanter.com/excel-programming/306670-copying-entire-row-formulas.html)

Lazer[_4_]

Copying an entire row of formulas
 
How do I copy all *forumlas* (without values) in row 10, for example, to
row 20?

In other words, if the forumla for cell W10 is "=+S10+U10", then the
when I copy the entire row of formulas to row 20, the formula for W20
should be "=+S20+U20", *not* "=S10+U10"

Thanks!
Eliezer


---
Message posted from http://www.ExcelForum.com/


No Name

Copying an entire row of formulas
 
Turn on the macro recorder
Select row 10
select copy
go to row 20 and place cursor in far left cell of row
select paste special formulas
turn off recorder
go to macro editor and see the code

Glen

-----Original Message-----
How do I copy all *forumlas* (without values) in row 10,

for example, to
row 20?

In other words, if the forumla for cell W10

is "=+S10+U10", then the
when I copy the entire row of formulas to row 20, the

formula for W20
should be "=+S20+U20", *not* "=S10+U10"

Thanks!
Eliezer


---
Message posted from http://www.ExcelForum.com/

.


Lazer[_5_]

Copying an entire row of formulas
 
I did that but it kept copying over the numbers. In the end, I figure
this out:

For columnIterator = 1 To Columns("EI" & ":" & "EI").Column
If Cells(10, columnIterator).HasFormula Then
Cells(currentRow, columnIterator).FormulaR1C1
Cells(10, columnIterator).FormulaR1C1
End If
Next

Thanks!
Elieze

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 11:30 PM.

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