Index and Match formula to exclude blanks

Rchudasama

New Member
Joined
Jul 28, 2016
Messages
13
Index and match formula but need it to exclude the blanks

Example

1 A B C D E F G
2 Name 1 Month 2 Month 3 Month 4 Month 5 Month 6 Month
3 a 1.9 1.1 1.8
4 b 5.1 1.0 0 2.8

I put in a formula to bring back the month when "a" or "b" reaches >1 for the first time

Formula results
a 1 Month INDEX($C$2:$H$2,MATCH(TRUE,INDEX(C3:H3>1,0),0) - but should be 4 Month
b 1 Month INDEX($C$2:$H$2,MATCH(TRUE,INDEX(C4:H4>1,0),0)) - but should be 2 month

I noticed that this happened because in "a" has blank cells in 1 month, 2 month and 3 month and "b" has blank cells in 1 month

How do I write the formula to exclude the blanks??

Thanks
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I would suspect that your 'blanks' are not really blank.
Are they formulas that are returning "" ? That is NOT considered blank, it's a text string.

Try
INDEX($C$2:$H$2,MATCH(1,INDEX((C3:H3>1)*(ISNUMBER(C3:H3)),0),0))
 
Last edited:
Upvote 0
I would suspect that your 'blanks' are not really blank.
Are they formulas that are returning "" ? That is NOT considered blank, it's a text string.

Try
INDEX($C$2:$H$2,MATCH(1,INDEX((C3:H3>1)*(ISNUMBER(C3:H3)),0),0))



OMG thank you!!!! this works!!! your awesome you don't know how much time you saved me!!
 
Upvote 0
Welcome to the MrExcel board!

FWIW, I think you could also have made this very minor change to your existing formula

=INDEX($C$2:$H$2,MATCH(TRUE,INDEX(C3:H3-1>0,0),0))
 
Upvote 0
I suspect those cells aren't blank but perhaps contain a single space or something that is greater than zero. Try this instead:

=INDEX($C$2:$H$2,MATCH(1,INDEX((C3:H3>1)*(ISNUMBER(C3:H3)),0),0))

WBD
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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