How can i write a vba code to get string or integer "C15" from $c$15?

  • Thread starter Thread starter d
  • Start date Start date
D

d

I use Excel VBA function.
I have CELL address : $c$15

How can i write a vba code to get string C15?
 
I'm not sure exactly what you want, but the Address property will return the
address of a cell or range. E.g.,

Msgbox Range("$C$15").Address(False,False)

See help on Address for more details.
 
sStr = "$C$15"
msgbox range(sStr).Address(external:=True) & vbnewline &
range(sStr).Value

or

maybe you want the address

sStr = Range("C15").Address(0,0)

or to get the value stored in the cell

Dim vVal as Variant
vVal = Range("C15").Value

hopefully you can get what you want from the above examples.
 
Back
Top