• 461K Members
• 5,096 Online
• 559K Conversations

New Contributor

# Index MATCH formula returns the next value in an array

Hello

Would appreciate if I can get some help on this problem.

If you please look at the attached excel file, I am trying to lookup value from one data set, into another. However, the index match formula is only giving the lowest value 10 (or even if I don't write 0, the index match formula will give me the highest value i.e. 30). Is there a way to write a formula so that if one value is selected from the array, the index match formula does not select it again? e.g. if 10 is selected then the next value that the index match formula picks up is 30 (and not 10)

Would appreciate any help!

5 Replies

# Re: Index MATCH formula returns the next value in an array

You may try the following Array Formula which requires confirmation with Ctrl+Shift+Enter instead of Enter alone.

In C3

``=IFERROR(INDEX(\$G\$3:\$G\$5,SMALL(IF(\$E\$3:\$E\$5=A3,IF(\$F\$3:\$F\$5=B3,ROW(\$E\$3:\$E\$5)-ROW(\$E\$3)+1)),ROWS(C\$3:C3))),"Record not in File B")``

Confirm it with Ctrl+Shift+Enter and then copy it down.

# Re: Index MATCH formula returns the next value in an array

Thank you! It worked!

Cheers

# Re: Index MATCH formula returns the next value in an array

You're welcome! Glad it worked as desired.

Please take a minute to accept the solution posted as an Answer, that would mark your question as Solved.

# Re: Index MATCH formula returns the next value in an array

apologies I might have jumped the gun there!

I have a follow-up question please. If you looked at the excel file, I changed name of person from Jamie to josh and I excepted the formula to pick the value '12' in the third row. But that's not what the formula is doing - any idea why this is happening?

Thank you

# Re: Index MATCH formula returns the next value in an array

Never mind.

In C3

``=IFERROR(INDEX(\$G\$3:\$G\$5,SMALL(IF(\$E\$3:\$E\$5=A3,IF(\$F\$3:\$F\$5=B3,ROW(\$E\$3:\$E\$5)-ROW(\$E\$3)+1)),COUNTIFS(\$E\$3:E3,A3,\$F\$3:F3,B3))),"Record not in File B")``

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies