Excel Formula - Value of the first non blank cell in a row

grace12

New Member
Joined
Sep 22, 2012
Messages
4
Hi all, I'm very very new to excel. I came across a formula to get the value of the first non blank cell in a row.

=INDEX(A1:C1, MATCH("*", A1:C1, 0))

This formula works for me, but question is what does "*" mean in excel? Unfortunately the person who posted this formula hasn't responded to me for weeks.

Plz help.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Haven't used that before, but I'm not sure it's correct.....try
Code:
=INDEX(A1:C1,MATCH(TRUE,A1:C1<>"",0))
Entered with CTRL + SHIFT + Enter
 
Upvote 0
Hi all, I'm very very new to excel. I came across a formula to get the value of the first non blank cell in a row.

=INDEX(A1:C1, MATCH("*", A1:C1, 0))

This formula works for me, but question is what does "*" mean in excel? Unfortunately the person who posted this formula hasn't responded to me for weeks.

Plz help.

"*" is a wildcard .
Is mainly use if you are looking or counting a part of the cell withing range.
Using in this case means "if there is something in a cell" return this cell.
But this will only works for Text values
You can use as well:

For Text:

=LOOKUP("zzzzz",A1:C1)
or for numerical values:
=LOOKUP(9.999999999E+307,A1:C1)
for Numerical values
 
Upvote 0
Hi all, I'm very very new to excel. I came across a formula to get the value of the first non blank cell in a row.

=INDEX(A1:C1, MATCH("*", A1:C1, 0))

This formula works for me, but question is what does "*" mean in excel? Unfortunately the person who posted this formula hasn't responded to me for weeks.

Plz help.

"*" means any text value, including a formula blank (i.g., ="") or a text number. Any logical value or number will be ignored, in addition to error values that MATCH itself ignores.

The fact that the match-type is set to 0 (FALSE) lets MATCH pick out the first text value, a formula blank or not.

If you don't want a formula blank as result, see Michael's reply.

An interesting question is how MATCH behaves with "*" as the value to match and with match-type set to 1 (TRUE). The formula

=INDEX(A1:C1, MATCH("*", A1:C1, 1))

returns #N/A, so does...

=LOOKUP("*",A1:C1)

a process consistency in the underlying algorithm, possibly a variant of "binary search." Compare with:

http://www.mrexcel.com/forum/excel-questions/310278-vlookup-multiple-matches-match-returned.html (post #7).


 
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,899
Members
449,477
Latest member
panjongshing

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