ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding a character type within a cell (https://www.excelbanter.com/excel-worksheet-functions/36541-finding-character-type-within-cell.html)

shineboxnj

Finding a character type within a cell
 

Is there a find or search function that will return the position of the
first number character within a cell?

for example

A1= TEST PRODUCT M123

is there a formula i could write that will return "15" being that is
the posistion in the cell that the "1" is in? I dont want to look for
the "1" in particular, just the first number in the cell.

thanks!


--
shineboxnj
------------------------------------------------------------------------
shineboxnj's Profile: http://www.excelforum.com/member.php...o&userid=18106
View this thread: http://www.excelforum.com/showthread...hreadid=389217


Bernie Deitrick

shineboxnj,

For your string in cell A1, the following array formula (entered using
Ctrl-Shift-Enter) will return 15:

=MIN(IF(ISERROR(1*(MID(A1,ROW(INDIRECT("A1:A"&LEN( A1))),1))),255,ROW(INDIRECT("A1:A"&LEN(A1)))))

All on one row.... watch any line breaks introduced by your newsreader.

HTH,
Bernie
MS Excel MVP

"shineboxnj" wrote
in message ...

Is there a find or search function that will return the position of the
first number character within a cell?

for example

A1= TEST PRODUCT M123

is there a formula i could write that will return "15" being that is
the posistion in the cell that the "1" is in? I dont want to look for
the "1" in particular, just the first number in the cell.

thanks!


--
shineboxnj
------------------------------------------------------------------------
shineboxnj's Profile:
http://www.excelforum.com/member.php...o&userid=18106
View this thread: http://www.excelforum.com/showthread...hreadid=389217





All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com