Index Match returns a #ref error

Bill416

New Member
Joined
Sep 14, 2009
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Below is a sample of my spreadsheet using an index match formula.

There are 2 tables on separate sheets in one spreadsheet.

Tabs are labelled Membership Trrips and Trip Data. the purpose is to combine 2 data sets from data collected on a website. The first table contains membership roster information. The second contains the data collected when members go out on trips. The tables shown below have been consolidated on the Members Trips sheet to determine if the error occurs when on separate sheets.

I currently manually export the data in an xlxs format and then save it in an xlsm format. I reformat the data to be in the same form for each sheet. For example, a date is formatted using the same date format. Numbers are set to no decimal points.

I am using the Member ID and the Date to return the contents of the Registered field in the Trip Datasheet. the 2 formulas that I have return #REF and #N/A. Can anyone help?

Bill

mnm-membership-Trips-master-^12023-24(AutoRecovered).xlsm
ABCDLMN
3Member IDLast NameFirst NameUser RoleTrip Date18Trip Date2Trip Date3
4April 24, 20232023-05-012023-05-08
5Week8910
63ThompsonBrent (AM)
74KlassenHank
89ThompsonLesley (AM)
912HamiltonJanet#REF!
1016WetterBrian#REF!
1117HowardErlinda#N/A
1218HowardFrank
1319BarnesPenny (G)
1420AtkinsonDavid
Membership Trips
Cell Formulas
RangeFormula
L9L9=INDEX($B$301:$D4500,MATCH(1,($A9=$B$301:$B4500)*(L$4=$C$301:$C4500)),0,3)
L10L10=INDEX($B$301:$D4501,MATCH(1,(L$4=$C$301:$C4501)*($A10=$B$301:$B4501)),0,3)
L11L11=INDEX('Trip Data'!$B$2:$D4000,MATCH(1,('Trip Data'!$B$1:$B625=$A12)*('Trip Data'!$C4:$C625=L$4),0),3)
Named Ranges
NameRefers ToCells
'Trip Data'!_FilterDatabase='Trip Data'!$B$1:$K$184L11

mnm-membership-Trips-master-^12023-24(AutoRecovered).xlsm
ABCD
300#recordsMember IDTrip Date2Registered
301404April 24, 20231
3075004June 19, 20231
3085324June 26, 20231
3095994July 3, 20231
3103412April 24, 20231
31746912June 19, 20231
31854312June 26, 2023
31960212July 3, 20231
3202416April 24, 20231
32125016May 22, 20231
3225817April 24, 20231
32339917June 12, 20231
3245618April 24, 20231
32539818June 12, 20231
Membership Trips
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The formula in L9 should be
Excel Formula:
=INDEX($B$301:$D4500,MATCH(1,($A9=$B$301:$B4500)*(L$4=$C$301:$C4500),0),3)
You had a closing bracket in the wrong place.
 
Upvote 0
In that case use the Evaluate formula button on the formula tab to see whether the problem is with the dates or the ID.
I suspect that the "dates" in col C are not real dates.
 
Upvote 0
I checked both column C and Row 4 Trip Date and all are formatted the same.

I have attached images of the formatting and the Evaluate Formula and I think the ID is fine but there is still something wrong with the Date.
 

Attachments

  • Colum C and Tripe Date2 format.png
    Colum C and Tripe Date2 format.png
    20.5 KB · Views: 12
  • evaluatge steps-1.png
    evaluatge steps-1.png
    10.3 KB · Views: 4
  • evaluatge steps-2.png
    evaluatge steps-2.png
    11.4 KB · Views: 15
  • evaluatge steps-3.png
    evaluatge steps-3.png
    11.2 KB · Views: 9
  • evaluatge steps-4.png
    evaluatge steps-4.png
    11.8 KB · Views: 18
  • evaluatge steps-5.png
    evaluatge steps-5.png
    11.4 KB · Views: 13
  • evaluatge steps-6.png
    evaluatge steps-6.png
    10.4 KB · Views: 18
  • evaluatge steps-7.png
    evaluatge steps-7.png
    10.5 KB · Views: 18
  • evaluatge steps-8.png
    evaluatge steps-8.png
    9.6 KB · Views: 16
Upvote 0
Very difficult to tell from those images, but it looks as though the dates are not actual dates.
If you select C301:C4500 & change the format to General do you still see dates?
 
Upvote 0
When I changed the format to General for C301:C4500 the first row changed to a number the rest still show as dates. When I go to Format and check these, the sample shows a number the rest show dates.
 
Upvote 0
In that case they are not real dates, but text. You will need to convert them all to dates.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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