Index & Match to ignore blanks

TheBarman

New Member
Joined
Jun 10, 2009
Messages
16
Hi team, hoping you can help with the index,match formula to find the occurrence where the storage unit is not blank (or zero). The formula is referring to a table (called "Runners") in another sheet. The table is refreshed every hour throughout the day to bring in new data. Unfortunately there are more columns of data than the sample below, so I am unable to use a pivot table or vlookup and must be an INDEX.


Here is where I am up to with the formula:

=IF(INDEX(Runners[[#All],[Storage Unit]],MATCH(F2,Runners[[#All],[Name]],0))<>0,INDEX(Runners[[#All],[Location]],MATCH(F2,Runners[[#All],[Name]],0)),"Give me second occurance")

F2 refers to another sheet with Names


Sample of table:

NameLocationStorage Unit
MichaelBrisbane4
PeterSydney
LouiseMelbourne
PeterPerth5
LouiseAdelaide9

<tbody>
</tbody>


Outcome:
Index Louise to find "Adelaide" because there is a value in the storage unit column [9] - not "Melbourne" because it's the first Match.
Index Peter to find "Perth" because there is a value in the storage unit column [5] - not "Sydney" because it's the first Match.



Appreciate your help.
Dave.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Maybe something like this:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
If someone can have more than 1 Unit, drag the formula down as needed and it will return all locations.
Excel Workbook
ABC
1NameLocationStorage Unit
2MichaelBrisbane4
3PeterSydney
4LouiseMelbourne
5PeterPerth5
6LouiseAdelaide9
7
8
9NameLouise
10Location(s)Adelaide
11
12
Sheet
 
Upvote 0
Also, using the Table references...

Control+shift+enter, not just enter:

=INDEX(Runners[Storage Unit],MATCH(F2,IF(ISNUMBER(Runners[Storage Unit]),Runners[Name]),0))

where F2 = Louise.
 
Upvote 0
You're welcome. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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