MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Please help me with looping

Posted by Mark Foss on August 23, 2001 10:34 AM

Hi, and thanks for the help. I need a formula for VB that will write a formula through an entire column with a formula that looks like this
the first formula should be:
the scond formula should be:
and so on. I am pretty sure there is an easy way to do this so any help would be greatly appriciated.

Thank you very much,


Posted by Barrie Davidson on August 23, 2001 11:30 AM

Mark, you could use this formula in the first cell and then copy down.



Posted by Gordon on August 23, 2001 5:28 PM

To enter the formula in cells A1:A10, the following code could be used (it is not necessary to select A1:A10) :-

Range("A1:A10").FormulaR1C1 = "=""AH"" & SUM(R1C9:RC9)"