find first numeric value in range

nicolewh

Well-known Member
Joined
Aug 7, 2009
Messages
554
Hope everyone had a wonderful Thanksgiving!! :)

I have a range A1 to A7 which includes text, empty cells, and numbers. I am trying to find the function to return the first instance of a number in the range. so for example (from A1 to A7) we have in each cell respectively:
"Orange", "", "", "12:35 PM", "", "", "1:15 PM"
The formula would return 12:35 PM

Thanks so much!

Nicole
 
try this
Excel Workbook
ABC
1san
2
3
412:3512:35
Sheet4
Excel 2003
Cell Formulas
RangeFormula
C4=INDEX(A1:A4,MATCH(TRUE,INDEX(ISNUMBER(A1:A4),0),0))
 
Upvote 0
On those same lines - how would I integrate a vlookup function into this formula, returning a corresponding value in another column.

So in our example, wherever the numeric value first appears in column A return the value from that same row but this time from column B. If cell B4 was "Apple" it would return "Apple" instead of "12:35"

Thanks

Nicole
 
Upvote 0
Hi Nicole

You just have to change the range reference in Sankar's formula:

=INDEX(B1:B4,MATCH(TRUE,INDEX(ISNUMBER(A1:A4),0),0))
 
Upvote 0
try this
Excel Workbook
ABC
1san
2
3
412:3512:35
Sheet4
Excel 2003
Cell Formulas
RangeFormula
C4=INDEX(A1:A4,MATCH(TRUE,INDEX(ISNUMBER(A1:A4),0),0))
Would anyone know if there is a way to than find the 2nd and 3rd following numeric values after this?
 
Upvote 0
As you have Excel 365, it's much easier than in the old days. Use the FILTER function:

Book2
ABCDEF
1san0.524306n2
24242
337
412:3521
5horse
6
742
8
9banana
1037
1121
12
Sheet12
Cell Formulas
RangeFormula
C1:C4C1=FILTER(A1:A12,ISNUMBER(A1:A12))
F2F2=INDEX(FILTER(A1:A20,ISNUMBER(A1:A20)),F1)
Dynamic array formulas.


The C1 formula lists out all the numeric values. The F2 formula lets you put the value you want in F1.

Incidentally, it's better to open a new thread with a question than to add your question to the bottom of a 12-year old thread. It's very possible no one will ever see your question.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top