Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Extract the row number

I would like to extract the row number in a reference formula

formula in cell "= Bef22022007!F293"

How can I extract the 293?

Thanks
Hilton






  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default Extract the row number

Use the MID and FIND functions eg:
=MID(A1, FIND("!", A1)+2, 5)

where 5 is longer than the longest number of digits in the row numbers you
are expecting.
the +2 takes account of only a single-letter column reference, if you can't
be sure that is always the case then wrap the above is an
IF(ISERR(VALUE(MID(blah))), ,) to test whether you caught an extra letter.
If you have 2007, this would be a neater way to trap that error:
=IFERROR(VALUE(MID(A1,FIND("!",A1)+2,5)),VALUE(MID (A1,FIND("!",A1)+3,5)))
--
Adam Vero
MCP, MOS Master, MLSS, CWNA
http://veroblog.wordpress.com
http://www.meteorit.co.uk


"Hilton" wrote:

I would like to extract the row number in a reference formula

formula in cell "= Bef22022007!F293"

How can I extract the 293?

Thanks
Hilton







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Extract the row number

=MID(A1,FIND("!",A1)+2,99)+0


"Hilton" wrote:

I would like to extract the row number in a reference formula

formula in cell "= Bef22022007!F293"

How can I extract the 293?

Thanks
Hilton







  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Extract the row number

Hi,

I don't think I made it clear - this is formula in a cell, not a label. So
the function must pick up the fomula in the cell and then extract the row
referenced by the formula. The solution provided works when I make the
formula a label.


"Teethless mama" wrote in message
...
=MID(A1,FIND("!",A1)+2,99)+0


"Hilton" wrote:

I would like to extract the row number in a reference formula

formula in cell "= Bef22022007!F293"

How can I extract the 293?

Thanks
Hilton









  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Extract the row number

You would need VBA for that or xl4, for a VBA solution see

http://www.mvps.org/dmcritchie/excel...htm#getformula


that will give you a string and then you could get the cell address using
MID or RIGHT


The only way one of Excel's regular functions will give you the cell is if
it is used like

=ADDRESS(ROW(Bef22022007!F293),COLUMN(Bef22022007! F293))

however if you put

=Bef22022007!F293

in A10 and wants the cell address then you would need the above VBA or one
of the GET functions from Excel4





"Hilton" wrote in message
...
Hi,

I don't think I made it clear - this is formula in a cell, not a label. So
the function must pick up the fomula in the cell and then extract the row
referenced by the formula. The solution provided works when I make the
formula a label.


"Teethless mama" wrote in
message
...
=MID(A1,FIND("!",A1)+2,99)+0


"Hilton" wrote:

I would like to extract the row number in a reference formula

formula in cell "= Bef22022007!F293"

How can I extract the 293?

Thanks
Hilton











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
extract number smonsmo Excel Discussion (Misc queries) 5 January 24th 07 12:14 PM
Extract number from text/number string.. nastech Excel Discussion (Misc queries) 5 July 5th 06 11:21 PM
How to extract the Number from a String johnbest New Users to Excel 3 December 19th 05 06:23 PM
how do i extract a number from a cell with no spaces? Mulvaney Excel Worksheet Functions 4 July 26th 05 09:15 PM
Extract sheet name/number to cell claytorm Excel Discussion (Misc queries) 1 June 27th 05 11:34 AM


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