Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
d d is offline
external usenet poster
 
Posts: 2
Default How can i write a vba code to get string or integer "C15" from $c$15?

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

How can i write a vba code to get string C15?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How can i write a vba code to get string or integer "C15" from $c$15?

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.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"d" wrote in message
...
I use Excel VBA function.
I have CELL address : $c$15

How can i write a vba code to get string C15?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can i write a vba code to get string or integer "C15" from $c$15?

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.

--
Regards,
Tom Ogilvy

"d" wrote in message
...
I use Excel VBA function.
I have CELL address : $c$15

How can i write a vba code to get string C15?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write formula for countif (range,"<2" &"3") Vinod Tripathi Excel Discussion (Misc queries) 1 May 1st 09 07:27 AM
How do I write an excel formula with a text answer ("yes" or "no") pat Excel Discussion (Misc queries) 1 September 9th 08 03:41 PM
Converting "uppercase" string data to "lower case" in CSV file [email protected] Excel Discussion (Misc queries) 2 August 12th 08 08:36 PM
text string: "91E10" in csv file auto converts to: "9.10E+11" [email protected] Excel Discussion (Misc queries) 2 August 12th 08 03:13 PM
is it possitle i write"1"and "one" will show in next coloumn. srksiddiqui Excel Discussion (Misc queries) 1 June 9th 08 02:37 PM


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"