Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Retrieving a Name of Cell
I wish to replace the cell references in a series of formulas with the
cells name. For Each rngcell In rngRange strFormula = rngcell.Formula 'and if the the formula begins with a '=' and DOES NOT contain a '.' If Left(strFormula, 1) = "=" And InStr(1, strFormula, ".") = 0 Then 'Then we need to iteratively replace each cell reference with a name reference... If InStr(strFormula, "+") = 0 Then ' then it is just in the form '=A34' Set rngcell2 = shtCurrent.Range(Right(strFormula, Len(strFormula) - 1)) msgbox rngcell2.Name ' I would hope this returned the cells name (e.g. TotalSales) 'here i will manipulate the string and replace the cell reference with a named ref. End if Next The problem is that the rngCell2.Name returns the cells other name (e.g. SheetName!$A$34) How do I get the given name? Many thanks for any help steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Retrieving a Name of Cell
Found it....
very very very simple!!! rngCell2.Name.Name Hope this helps someone else! Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Retrieving a tuple for a cell. | Excel Discussion (Misc queries) | |||
Cell searching and retrieving | Excel Discussion (Misc queries) | |||
Retrieving a value from a cell | Excel Programming | |||
Help Retrieving Cell Values | Excel Programming | |||
Retrieving a cell value with a SQL statement | Excel Programming |