Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Name a Range - Macro
I have a large workbook with more than a thousand rows. After I sort the
rows, they are separated into 18 groups. I total each group by using sum in active cell macro. I'd like to name each total so I add which total I want to add. If I define a name for each total, the macro would read, example: ActiveWorkbook.Names.Add Name:="Total1", RefersToR1C1:="=Sheet1!R15C13" the above macro command refers ro Row 15, Column 13 When I add more date to the workbook and re-sort it, the named range no longer refers to the total of group one. How can I write a macro defining a range name in this situation? Note that I before sorting, I would delete the named ranges then, sum each group and re-name the total for each group. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to change Chart Range when inserting a column | Charts and Charting in Excel | |||
Macro to copy range from Excel files in folder | Excel Discussion (Misc queries) | |||
Is it possible to set a variable range in a macro? | About this forum | |||
Macro - define cell range for a sum function | Excel Discussion (Misc queries) | |||
Help with macro formula and variable | Excel Worksheet Functions |