Problem with INDEX/MATCH It work for first 3 row only

joeeee

New Member
Joined
Jan 14, 2018
Messages
2
Hi

I have a problem with INDEX/MATCH formula. I have many scenarios writen in second sheet named 'source'. Single scenario has 3 rows with same number of scenario. Column A and B are source for this index/match formula



this formula i have in C2
IF($b2="";"";INDEX(Source!D:D;MATCH($b2;Source!C:C;0);MATCH($a2;Source!B:B;0)))
This formula is also in whole C column.







I have another sheet with name SOURCE where i have data related to this INDEX MATCH formula. It works fine, but only for the first scenario, which is under number 1. If i put scenario number 1 in any other cell (like in cell c11) formula work great.

But when i wanna other data from othe scenarios like scenario 2 or 3 i get [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ref]#ref [/URL] ! If i put scenario number 2 or 3 in cell c2 i get [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ref]#ref [/URL] !


Where or what is problem here ?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
any spaces around source v lookup, as that will effect values
 
Upvote 0
=IF($b2="";"";INDEX(Source!D:D;MATCH($b2;Source!C:C;0);MATCH($a2;Source!B:B;0)))

Hello joeeee, welcome to MrExcel

I doubt your formula is correctly written for what you want to do. In the above the first MATCH defines the row number and the second MATCH (in red) defines the column number......but because your INDEX range is a single column only (Source!D:D) you'll get a #REF! error if that MATCH returns a value > 1.

If you want to return the value from Source!D:D in the row where the other two conditions match then you need this version:

=IF($b2="";"";INDEX(Source!D:D;MATCH(1,INDEX(($b2=Source!C:C)*($a2=Source!B:B);0);0)))

......although it's also advisable to use shorter ranges rather than whole columns
<strike></strike>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,737
Messages
6,126,563
Members
449,318
Latest member
Son Raphon

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