![]() |
Dynamic FormulaR1C1 value
I have the following statement:
ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)" I would like to replace the -4 with a count variable that I created: ActiveCell.FormulaR1C1 = "=SUM(R[-Count]C:R[-1]C)" This is not working. The idea is that I want to sum Count number of cells above my active cell. Help please? |
Dynamic FormulaR1C1 value
ActiveCell.FormulaR1C1 = "=SUM(R[-" & Count & "]C:R[-1]C)"
Tim "Nuraq" wrote in message ... I have the following statement: ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)" I would like to replace the -4 with a count variable that I created: ActiveCell.FormulaR1C1 = "=SUM(R[-Count]C:R[-1]C)" This is not working. The idea is that I want to sum Count number of cells above my active cell. Help please? |
Dynamic FormulaR1C1 value
ActiveCell.FormulaR1C1 = "=SUM(R[-" & _
Count & "]C:R[-1]C)" -- Regards, Tom Ogilvy "Nuraq" wrote in message ... I have the following statement: ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)" I would like to replace the -4 with a count variable that I created: ActiveCell.FormulaR1C1 = "=SUM(R[-Count]C:R[-1]C)" This is not working. The idea is that I want to sum Count number of cells above my active cell. Help please? |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com