Index/Match with multiple results help needed

c1nn4m0n

New Member
Joined
Nov 10, 2017
Messages
6
Hello! I am attempting to populate a series of cells (sheet 1, C4-I4) with store numbers based on users inputting a market name into sheet 1 B2 and using an index/match to return up to 7 unique matches in C4-I4. I have been able to write a formula to populate the cells with matches, but when I have less than 7 matches results are input in my cells that are not a match when I want my cells to remain blank if there are no more matches.

Here is the formula I am using: =INDEX('Quarterly Results'!$A:$A, MATCH($B$2, 'Quarterly Results'!$B:$B,0)...adding +1 to +6 in subsequent cells.

Any help would be SO greatly appreciated!!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to Mr Excel

You might wrap your formula with IFERROR and automate the +0, +1..+6 (if the values in Column A are grouped)

Something like this
C4
=IFERROR(INDEX('Quarterly Results'!$A:$A, MATCH($B$2, 'Quarterly Results'!$B:$B,0)+COLUMNS($C4:C4)-1)),"")
copy across till I4

Hope this helps

M.
 
Upvote 0
Thanks for the reply! I actually get an error when I copy over the formula you provided "Your formula is missing a parenthesis--) or (. Check the formula, and then add the parenthesis in the appropriate place."

I'm fine manually entering the +1, etc as the formula will be static in these 7 cells only, I just need to figure out how to wrap my INDEX/MATCH with an IFERROR that will return a blank when there are less than 7 matches in "Quarterly Results'!$B:$B (SO when there are only 3 matches, 4 cells will result in blanks - right now they are pulling in other store numbers that are not resulting in a match in QR B:B)
 
Upvote 0
Sorry, i misunderstood your question

Try this formula in C4 copied across
=IF(COUNTIF('Quarterly Results'!$B:$B,$B$2)>=COLUMNS($C4:C4),INDEX('Quarterly Results'!$A:$A,MATCH($B$2,'Quarterly Results'!$B:$B,0)+COLUMNS($C4:C4)-1),"")

M.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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