Return First Non Blank Value in a row

BenDoc08

Board Regular
Hi All,

I've run into a dilemma where I need to return the first non blank value in a range. I've looked at using an array formula like this:

{=INDEX(range,MATCH(FALSE,ISBLANK(range),0))}

However I am running into a problem because the cells in my range are formulas. Here is an example of the type of formula in these cells:

=IF(RIGHT(\$A6,9)="Sheep Dog","Sheep Dog","")

Basically, what seems to be happening is that the index(match) array formula is treating "" as a non blank value. Is there a way around this?

To give a better understand of what I'm trying to achieve, I have a list of animals. In column A I have animal data (e.g. Red Sheep Dog, Large ****atoo). I don't care for colour or size, just type of animal. I only have a list of 20-25 animals so I've created a calculation cell for each type and it returns either the type I want or "". This is the range from which I want to return the first non blank value. Perhaps there is an easier way to do this then what I am doing, but I have no knowledge of VBA unfortunately.

Any help would be appreciated.

Thanks,
Ben

Last edited:

Excel Facts

Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

godsaaint

Active Member
Try(CTRL-SHIFT-ENTER): =INDEX(range,MATCH(FALSE,range="",0))

arthurbr

Well-known Member
Try =INDEX(A1:A13,MATCH(TRUE,INDEX((A1:A13<>""),0),0)) ( regular formula)

Last edited:

BenDoc08

Board Regular
Try =INDEX(A1:A13,MATCH(TRUE,INDEX((A1:A13<>""),0),0)) ( regular formula)

This worked perfectly! Thank you very much for your help

Replies
3
Views
99
Replies
0
Views
247
Replies
9
Views
112
Replies
1
Views
50
Replies
1
Views
220

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,863
Messages
5,834,051
Members
430,259
Latest member
msthiagu

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.

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

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