finding the first numerical value in a range

piggylumps

Board Regular
Joined
May 11, 2011
Messages
55
Hopefully this is the last one today,

I have a range going from b4:h4, it will usually start with 0.00 (but not always) and carry on, what I want a cell to do is return the first cell in that range that has a numerical value in it.

so say the range is:

0, 0, 12676, 12679, 23803.....

I'd need to have the 12676 returned.

Any ideas?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
think I've just done it, testing an array now of:

{=MIN(IF(B4:H4,B4:H4))}

seems to be workign so far, fingers crossed
 
Upvote 0
Hopefully this is the last one today,

I have a range going from b4:h4, it will usually start with 0.00 (but not always) and carry on, what I want a cell to do is return the first cell in that range that has a numerical value in it.

so say the range is:

0, 0, 12676, 12679, 23803.....

I'd need to have the 12676 returned.

Any ideas?
Assuming the numbers are always positive numbers...

Try ths array formula**:

=INDEX(B4:H4,MATCH(TRUE,B4:H4>0,0))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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