Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
variables inside a formula??
here's what I have ActiveCell.FormulaR1C1 = "=sum(R[-176]C:R[-1]C)" trouble is the rows are not always the same and I want to use a variable instead of a fix number. ActiveCell.FormulaR1C1 = "=sum(R[variableX]C:R[variableY]C)" variableX being the top of the column and variableY being the cell above the active cell. I can't seem to get it to recognize variableX and variableY I thought this would be simple enough, but it's driving me nuts. -- zerosleep ------------------------------------------------------------------------ zerosleep's Profile: http://www.excelforum.com/member.php...o&userid=17846 View this thread: http://www.excelforum.com/showthread...hreadid=517795 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
variables inside a formula??
Hi zerosleep,
try to connect the different parts of the formula like text: ActiveCell.FormulaR1C1 = "=Sum(R[-" & (Var1- (Var2 + 1)) & "]C:R[-1]C)" Hope this helps and you can again sleep fine (at least at home) Udo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
variables inside a formula??
thank you Udo! that helped alot. I tried all that, but I couldn't get the " and the & straight so it didn't work for me. thanks to you I was able to see how that works and now everything is peachy...:) I should just head home and crawl into bed! THANKS again. -- zerosleep ------------------------------------------------------------------------ zerosleep's Profile: http://www.excelforum.com/member.php...o&userid=17846 View this thread: http://www.excelforum.com/showthread...hreadid=517795 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup inside a formula | Excel Worksheet Functions | |||
use CTRL key inside a formula | Excel Worksheet Functions | |||
How to embed large number of variables in text inside a text box? | Excel Discussion (Misc queries) | |||
How to use text value inside a formula | Excel Programming | |||
looping with formula inside | Excel Programming |