Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming
I have a simple code that sums a changing range as follows:
Sub AddTotal() Dim rRange As Range Set rRange = Range("C2", Range("C65536").End(xlUp)) Range("C65536").End(xlUp)(2, 1) = "=Sum(" & rRange.Address & ")" End Sub Question: Is there a way to name the range too, for recall in a ListBox? It would have to replace the existing name definition as the range changes each time data is added or deleted from the range. Any suggestions would be appreciated. Thanks -Randy- .. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming
Randal,
Do you want to name the rRange range? If so, use ThisWorkbook.Names.Add "TheName",rRange -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Randal W. Hozeski" wrote in message news:gz_Bb.363158$ao4.1225214@attbi_s51... I have a simple code that sums a changing range as follows: Sub AddTotal() Dim rRange As Range Set rRange = Range("C2", Range("C65536").End(xlUp)) Range("C65536").End(xlUp)(2, 1) = "=Sum(" & rRange.Address & ")" End Sub Question: Is there a way to name the range too, for recall in a ListBox? It would have to replace the existing name definition as the range changes each time data is added or deleted from the range. Any suggestions would be appreciated. Thanks -Randy- . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with naming | Excel Discussion (Misc queries) | |||
Tab Naming | Excel Worksheet Functions | |||
Tab Naming | Excel Worksheet Functions | |||
Tab Naming | Excel Discussion (Misc queries) | |||
Tab naming | Excel Discussion (Misc queries) |