Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to insert the following formula on the first sheet in the my
workbook to add up the same cell on each sheet in the workbook. var1 = worksheets (1).name ' First w = worksheets.count var2 = worksheets(w).name ' Last ActiveCell.FormulaR1C1 = "=SUM(First:Last!RC)" I got this formula by recording a macro in Excel to get started. "First" and "Last" are the sheet names for this workbook. I would like to use 2 variables for the first and last worksheets (instead of hard coding the sheet names since the names will be different depending on the user. I tried to put the above formula in a macro (with variables for the sheet name) but when I look at the activecell, the formula is displayed instead of the result. Any help would be greatly appreciated. Thanks for your help.......... -- JT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
right syntax | Excel Worksheet Functions | |||
SQL syntax | Excel Programming | |||
Names.Add - Range Syntax Issue | Excel Programming | |||
Need help with Syntax | Excel Programming | |||
Syntax | Excel Programming |