Index, Match expert help needed.

barham

New Member
Joined
Jan 13, 2015
Messages
26
I used the below formula to get an exact match but it keeps returning a #N/A result:

=INDEX($C$10:$L$21,MATCH(C3,$B$10:$B$21,0),MATCH(C1,$C$9:$L$9,0))

Based on the information on table 1 and 2, I need a value on cell C4. In looking at the table the answer should be 15 but the formula is not returning a valid number. Please help.

Thank you

[TABLE="width: 961"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Columns[/TD]
[TD]Table 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Rows[/TD]
[TD]1[/TD]
[TD]Day of month[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]23[/TD]
[TD]24[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]27[/TD]
[TD]28[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD]Date[/TD]
[TD]2/19/2015[/TD]
[TD]2/20/2015[/TD]
[TD]2/21/2015[/TD]
[TD]2/22/2015[/TD]
[TD]2/23/2015[/TD]
[TD]2/24/2015[/TD]
[TD]2/25/2015[/TD]
[TD]2/26/2015[/TD]
[TD]2/27/2015[/TD]
[TD]2/28/2015[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]3[/TD]
[TD]Month[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD]February[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]4[/TD]
[TD][/TD]
[TD]#N/A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]7[/TD]
[TD]Table 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]9[/TD]
[TD]Day of Month[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]23[/TD]
[TD]24[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]27[/TD]
[TD]28[/TD]
[TD][/T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D]17[/TD]
[TD]29[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]30[/TD]
[TD]23[/TD]
[TD]25[/TD]
[TD]23[/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]17[/TD]
[TD]August[/TD]
[TD]28[/TD]
[TD]15[/TD]
[TD]26[/TD]
[TD]14[/TD]
[TD]11[/TD]
[TD]25[/TD]
[TD]24[/TD]
[TD]28[/TD]
[TD]20[/TD]
[TD]29[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]18[/TD]
[TD]September[/TD]
[TD]35[/TD]
[TD]18[/TD]
[TD]21[/TD]
[TD]14[/TD]
[TD]12[/TD]
[TD]21[/TD]
[TD]23[/TD]
[TD]42[/TD]
[TD]26[/TD]
[TD]24[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]19[/TD]
[TD]October[/TD]
[TD]33[/TD]
[TD]22[/TD]
[TD]22[/TD]
[TD]11[/TD]
[TD]17[/TD]
[TD]33[/TD]
[TD]24[/TD]
[TD]32[/TD]
[TD]31[/TD]
[TD]25[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]20[/TD]
[TD]November[/TD]
[TD]29[/TD]
[TD]29[/TD]
[TD]29[/TD]
[TD]15[/TD]
[TD]15[/TD]
[TD]34[/TD]
[TD]27[/TD]
[TD]29[/TD]
[TD]41[/TD]
[TD]33[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]21[/TD]
[TD]December[/TD]
[TD]41[/TD]
[TD]22[/TD]
[TD]25[/TD]
[TD]17[/TD]
[TD]14[/TD]
[TD]25[/TD]
[TD]35[/TD]
[TD]41[/TD]
[TD]30[/TD]
[TD]28[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Need to isolate which (if not both) of the Match functions is returning #N/A

Put the 2 matches into seperate cells
=MATCH(C3,$B$10:$B$21,0)
and
=MATCH(C1,$C$9:$L$9,0)

Which one (or both) returns #N/A ?
 
Upvote 0
They both return the #N/A. I think I have to use both Matches in order to find the value but do not understand why it returns an error.
 
Upvote 0
The only reason for MATCH to return N/A is because a match wasn't found...

Sounds like 1 of your tables is actually Dates, but formatted as either mmmm or dd, while the other is just text strings "January" or numbers 10 11 12 ect..

Take the first match
=MATCH(C3,$B$10:$B$21,0)

What EXACTLY is in C3, a TEXT string "January", or a DATE formatted as "mmmm" ?
Whichever it is, the values in B10:B21 are the opposite.

Same for the 2nd match
=MATCH(C1,$C$9:$L$9,0)

What exactly is in C1, a Date formatted as dd to show only the number, or just an actual number 10 11 12 ?
Whichver it is, the values in C9:L9 are the opposite.
 
Upvote 0
For C3, I used the date 2/19/15 and the Formula =Text(C2,"mmmm") and used the =text(c2,"D") for to come up with the 19 in C1.
 
Upvote 0
OK, that's half of it..

How did the January February values get into B10:B20, and the Day values into C9:L9 ?
 
Upvote 0
What I mean is, what are their actual values.
My guess is that they are DATES like 1/1/2015, but the cells are only formatted to show mmmm and/or d

Let's take the 2 matches one at a time.

Take the first match
=MATCH(C3,$B$10:$B$21,0)
Try changing that to
=MATCH(C2,$B$10:$B$21)

What do you get?
 
Upvote 0
For the purpose of my table, I cannot reference 2/19/15 but instead 19, 20, 21 etc because the table changes daily.

The january is in General and the figures are in numbers. Sorry for the confusion.
 
Upvote 0
If you don't mind, Providing me an email and I can send you the spreadsheet of what I'm actually dealing with. Thanks
 
Upvote 0

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