Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Danny
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to change Chart Range when inserting a column Mark Charts and Charting in Excel 1 September 13th 05 01:12 PM
Macro to copy range from Excel files in folder nc Excel Discussion (Misc queries) 1 June 15th 05 11:11 AM
Is it possible to set a variable range in a macro? Mary About this forum 0 June 12th 05 06:26 PM
Macro - define cell range for a sum function Fad Excel Discussion (Misc queries) 2 June 6th 05 12:40 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"