Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing a named range within a formula
I'm trying to set up a macro that will update the reference to a anamed range
within a formula. For example, cell A1 contains a value of "LastName" which also happens to be a named range. Cell B1 contains the formula "=Count(LastName)" When I change the value of A1 to the name of another named range, i.e. "Address", and run the code, I want the formula in B1 to change to "=Count(Address)" Ideas? -- Thanks, Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing a named range within a formula
Create a name called, for example, CountRange and assign it to =COUNT(INDIRECT($A$1)) Then call it from a cell with =CountRange It will return the COUNT of the range whose name appears in cell A1. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Wed, 18 Feb 2009 13:19:02 -0800, Mark b. wrote: I'm trying to set up a macro that will update the reference to a anamed range within a formula. For example, cell A1 contains a value of "LastName" which also happens to be a named range. Cell B1 contains the formula "=Count(LastName)" When I change the value of A1 to the name of another named range, i.e. "Address", and run the code, I want the formula in B1 to change to "=Count(Address)" Ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing font color in named range using vba | Excel Programming | |||
changing font color in named range using vba | Excel Programming | |||
Copying a named range with a changing cell reference | New Users to Excel | |||
Changing graph axes using named range | Excel Programming | |||
Changing graph axes using named range | Charts and Charting in Excel |