View Single Post
  #1   Report Post  
Danny
 
Posts: n/a
Default VBA Code - NAME SEVERAL VARIABLE cells

I have a large workbook with more than a thousand rows. After sorting, the
rows are separated into 18 groups. I total each group (column D) by using
sum in active cell macro (naming the group totals Total1 to Total18).

I'd like to write a macro to name each total (cell) so I can use the name of
each or a combination of the named cells.

How can I write a macro for this situation? ActiveWorkbook.Names.Add
Name:="saytotal1", RefersToR1C1:==?????????

How can I write a macro to name SEVERAL unknown/variable cells?

Before sorting, the named ranges would be deleted, then, sum each group and
re-name (use the macro that I need VERY BADLY) the new total (cell) for each
group.

Thanks in advance.