Stumped on how to use an Index and Match statement within an IF Function

clawren4

New Member
Joined
Sep 15, 2015
Messages
3
I am trying to put an if statement before my index statement.

The index statement works:
=+INDEX($C$52:$C$125,MATCH(M31,$E$52:$E$125,0))

I want to put an if statement, so that if the my value in L3 can be matched to the array A52:A124, it will return the value from the index statement above. This is what I have, which returns #VALUE

IF(L3=A52:A124,(INDEX($C$52:$C$125,MATCH(M30,$E$52:$E$125,0))),0)

Help!!!!!!:confused:
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
First, I believe you need to use CTRL+SHIFT+ENTER to use that formula instead of just ENTER. Give that a try and see what you get. If you've done it correctly, you will see { } surrounding your formula.
 
Upvote 0
Awesome, thanks. That got rid of the error. Now I have to figure out why its not returning the value from the index. L3 is within A52:A124
 
Upvote 0
How about:
Code:
=IF(ISNUMBER(MATCH(L3,$A$52:$A$124,0)),INDEX($C$52:$C$125,MATCH(M30,$E$52:$E$125,0)),0)
 
Upvote 0
Or this:

=IFERROR(INDEX(IF(L3=A52:A124,$C$52:$C$125,""),MATCH(M30,$E$52:$E$125,0)),"")

CTRL+SHIFT+ENTER
 
Upvote 0
Thank You! That works, but im trying to fix the first problem still, how to only return the value for the row in which L3 equals or matches the row in the array. Other rows have the same index value. I dont know if this makes sense
 
Upvote 0
Thank You! That works, but im trying to fix the first problem still, how to only return the value for the row in which L3 equals or matches the row in the array. Other rows have the same index value. I dont know if this makes sense

Who were you replying to? Did you try Marcel's formula in post #4 or mine in post #5?
 
Upvote 0
Additionally, it would be helpful if you could describe your requirements. Based on the info in #6 I start wondering if you shouldn't use SUMIFS.
Than again, the ranges have different sizes (A52:A124 versus E52:E125), or would that be a mistake?
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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