Uninterrupted list with INDEX/MATCH

dafan

Well-known Member
Joined
May 6, 2008
Messages
692
Hi all,

I have a list in which I have to lookup various Groups and find a Name accordingly. I am now using a very simple IF formula but I get blanks too. Refer below for an example. (A and B are data table, D and E are lookup).

Excel Workbook
ABCDE
1NameGroupGroupName
2AA0
3MikeAAMike
4AA0
5JasonAAJason
Sheet1




I want to get an uninterrupted list of the values. How can I achieve this?

Ive been playing around with SMALL(IF( and stuff but just can't figure it out.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Is there a value in B2? From what you've posted, the value returned would be 0 since there isn't anything there.

You could use =IF(B2=D2,IF(A2="","BLANK",A2)) changing "BLANK" to be whatever you want it to be.
 
Upvote 0
No you don't get it.

I want to have returned Mike in E2, Jason in E3. No blanks or any other value whatsoever.
 
Upvote 0
Could we use some helper columns like this?

1. E1 houses a 0.

2. E2 & G2 formulas copied down.

3. Columns E:F could be hidden if required. Also any pair of available columns could be used instead of columns E:F.

Excel Workbook
ABCDEFG
1NameGroupGroup02Name
2AA0Mike
3MikeAA1Jason
4AA1
5JasonAA2
6
Sheet1
 
Upvote 0
Peter:
Thanks! I got rid of F1 and used COUNTIF($B$2:$B$5,$D$2) instead. Can we get rid of E:E in some way? I'm not 100% sure what it does in your formula either.

Scous:
Thanks for the input but it is not what i am looking for. I can use formulas like yours ofc, but what i want is what Peter gave.
 
Upvote 0
Did you just delete a post?

I've noticed that arrays work too
Code:
=IF(ROWS(F$2:F2)>COUNTIF($B$2:$B$5,$D$2),"",INDEX(A:A,MATCH(ROWS(F$2:F2),{0,0,1,1,2},0)))

Can we get the results in E:E in 1 array formula?
 
Upvote 0
I got rid of F1 and used COUNTIF($B$2:$B$5,$D$2) instead.
Where did you put this and how did it help? Could you post a screen shot to show?

In your sample, every row has the same thing in col B and D. Is this always true? If so, the answer changes considerably.
 
Upvote 0
Well, you've just made those formulas more complex than they need be, and therefore using up more resources. If you don't like cell F1 or column E, just hide them. Or put them in columns Y and Z and hide them if you really want your list in column E.

Also, you didn't answer my other question. Is this really just a question of getting a list of the names in column A, or would some of the names be omitted from the list because their column B & D values do not match. If you want a good and efficient solution, we need to know the full circumstances.
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,047
Members
449,206
Latest member
Healthydogs

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