returning a cell name

B

brandon

I have given the cell A1 a name (ie smith). In another cell I am trying to
use the address function to tell me what that cell has been named. If I type
in =address(1,1) it returns $a$1. I want it to return smith. Does anyone know
how to do this?
 
D

Don Guillett

Put this in a REGULAR module instead of a sheet module or ThisWorkbook.
Then

=cn(a1) where a1 contains the cell name

Function cn(x)
cn = x.Name.Name
End Function
 
B

brandon

amazing, worked like a charm
thank you


Don Guillett said:
Put this in a REGULAR module instead of a sheet module or ThisWorkbook.
Then

=cn(a1) where a1 contains the cell name

Function cn(x)
cn = x.Name.Name
End Function
 
Top