ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a formula using the loop variable (https://www.excelbanter.com/excel-programming/314450-creating-formula-using-loop-variable.html)

Spector[_2_]

Creating a formula using the loop variable
 

Thank you so much!

Here's what I ended up actually using:
With ActiveCell
For ii = 1 To rowCnt - 1
.Offset(rowCnt, ii).FormulaR1C1 = "=R[" & ii - rowCnt & "]C[" & -1 - i
& "] "
Next
End With

alla

--
Specto
-----------------------------------------------------------------------
Spector's Profile: http://www.excelforum.com/member.php...fo&userid=1561
View this thread: http://www.excelforum.com/showthread.php?threadid=27163


Bob Phillips[_6_]

Creating a formula using the loop variable
 
That won't work whichever cell you are in, the other does.

--

HTH

RP

"Spector" wrote in message
...

Thank you so much!

Here's what I ended up actually using:
With ActiveCell
For ii = 1 To rowCnt - 1
Offset(rowCnt, ii).FormulaR1C1 = "=R[" & ii - rowCnt & "]C[" & -1 - ii
& "] "
Next
End With

allan


--
Spector
------------------------------------------------------------------------
Spector's Profile:

http://www.excelforum.com/member.php...o&userid=15618
View this thread: http://www.excelforum.com/showthread...hreadid=271630





All times are GMT +1. The time now is 05:04 PM.

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