Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding rows to spreadsheet after macro is written
I need to add some rows and / or columns to a spreadsheet. After I add the
columns / rows, the macros that I built blow up. I have tried adding $ signs to the cell references, ie: Range("D56") becomes Range ("$D$56), but this does not seem to work. In excel the formulas scale to reflect any row/col additions or deletions. Any thoughts on what I should do to the macro language to ensure that the macro changes and the layout of the sheet changes? Thanks -- sd |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding rows to spreadsheet after macro is written
I find that the best solution is to name the ranges that you want to use in
your macros. Then use the range names instead of the cell references. -- Vasant "iamn94" wrote in message ... I need to add some rows and / or columns to a spreadsheet. After I add the columns / rows, the macros that I built blow up. I have tried adding $ signs to the cell references, ie: Range("D56") becomes Range ("$D$56), but this does not seem to work. In excel the formulas scale to reflect any row/col additions or deletions. Any thoughts on what I should do to the macro language to ensure that the macro changes and the layout of the sheet changes? Thanks -- sd |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding rows to spreadsheet after macro is written
best to use a defined range name that will auto adjust
insertnamedefinename it mysumrange in the refers to box =offset($a$2,0,0,counta($a:$a,1) look n help for offset. adjust to your needs -- Don Guillett SalesAid Software "iamn94" wrote in message ... I need to add some rows and / or columns to a spreadsheet. After I add the columns / rows, the macros that I built blow up. I have tried adding $ signs to the cell references, ie: Range("D56") becomes Range ("$D$56), but this does not seem to work. In excel the formulas scale to reflect any row/col additions or deletions. Any thoughts on what I should do to the macro language to ensure that the macro changes and the layout of the sheet changes? Thanks -- sd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding new rows to an Excel spreadsheet | Charts and Charting in Excel | |||
Adding five new rows every 40 rows in a spreadsheet? | Excel Discussion (Misc queries) | |||
Sum only adding rows on page instead of entire spreadsheet - help | Excel Discussion (Misc queries) | |||
running-total formulas written from one spreadsheet to another | Excel Programming | |||
Adding new rows to spreadsheet | Excel Programming |