Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Retrun row value for $A$12 , return 12

Hi All

How to return $A$12 , 12 by Excel rows/address function ?

Current I am using below coding.

Function get_row(loString)
Dim a As String

get_row = Mid(loString, InStr(2, loString, "$") + 1, Len(loString) -
InStr(2, loString, "$"))


End Function

Sub test()
Dim a As String
a = "$A$12"
MsgBox get_row(a)
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Retrun row value for $A$12 , return 12

I would probably use this method myself...

Function get_row(loString)
get_row = Range(loString).Row
End Function

That way, the address being passed into the function can have any
combination of absolute and/or relative address components.

--
Rick (MVP - Excel)


"moonhk" wrote in message
...
Hi All

How to return $A$12 , 12 by Excel rows/address function ?

Current I am using below coding.

Function get_row(loString)
Dim a As String

get_row = Mid(loString, InStr(2, loString, "$") + 1, Len(loString) -
InStr(2, loString, "$"))


End Function

Sub test()
Dim a As String
a = "$A$12"
MsgBox get_row(a)
End Sub


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
Vlookup will not retrun value Dave Shultz Excel Discussion (Misc queries) 2 March 5th 10 09:10 PM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
Retrun "" (blank) Jay Excel Worksheet Functions 1 October 10th 06 03:47 AM
Retrun a worksheet from a function Jean-Pierre Bidon Excel Programming 3 December 14th 05 07:10 PM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 02:39 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"