another vlookup with multiple results post

AceFI

Board Regular
Joined
Apr 20, 2012
Messages
91
hi team,
i know this has been done to death, however trying to match multiple results, using a date variable...

Raw Data: (sheet name)

ABCDEFGHI
Customer Numbervar1Var2var3Var4Var5Var6Create DateVar7
11/2/21
22/2/21
31/2/21
42/2/21
52/3/21
62/3/21
71/2/21
85/2/21

ACTUAL DATA (sheet name)

my formula before i put it in an array is as follows;
=INDEX('Raw Data'!$A$2:$A$500, SMALL(IF((Day2Date='Raw Data'!$H$2:$H$500), MATCH(ROW('Raw Data'!$H$2:$H$500), ROW('Raw Data'!$H$2:$H$500)), ""),ROWS('Raw Data'!$A$1:A1)))

i'm getting the #NUM! error and can't really see where i went wrong?

TIA
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
@AceFI
From your sample it looks like your dates in column H are text and I guess you are trying to look up a 'real' date (number) so try this modification to your formula.

=INDEX('Raw Data'!$A$2:$A$500, SMALL(IF((Day2Date='Raw Data'!$H$2:$H$500+0), MATCH(ROW('Raw Data'!$H$2:$H$500), ROW('Raw Data'!$H$2:$H$500)), ""),ROWS('Raw Data'!$A$1:A1)))
 
Last edited:
Upvote 0
@AceFI
From your sample it looks like your dates in column H are text and I guess you are trying to look up a 'real' date (number) so try this modification to your formula.

=INDEX('Raw Data'!$A$2:$A$500, SMALL(IF((Day2Date='Raw Data'!$H$2:$H$500+0), MATCH(ROW('Raw Data'!$H$2:$H$500), ROW('Raw Data'!$H$2:$H$500)), ""),ROWS('Raw Data'!$A$1:A1)))
thanks Peter - they are date formatted not text? (sorry.. i should have said that)
 
Upvote 0
@AceFI

As well as addressing snjpverma's questions, can you please also address my request to update your account details. If we do not know what Excel version you are doing then we do not know what functions or other resources you have that may assist in getting you the result you need.

Can you also please give us details about the named range Day2Date, including what value it holds and whether it is text or numeric?
 
Upvote 0
thanks all. still #num! result.
Looking back at the raw sheet, i've mad an error in the format of the 'create date'. its "2021-04-28 19:05" however, if i change the format to DD/MM/YY it changes fine (so its recognising its a date)
One thing / point i think i'm missing is referencing the 'day' portion of 'day2date' and 'day' in column H's data retrieval.

I'm designing this on Excel for mac 16.52.10 however it will be used within o365 online mainly
 
Upvote 0
I'm designing this on Excel for mac 16.52.10 however it will be used within o365 online mainly
So, put this information in your profile so that it shows up like this so is always available to helpers. You can enter multiple version & multiple platforms if required.

1631600251751.png


format of the 'create date'. its "2021-04-28 19:05" however, if i change the format to DD/MM/YY
Changing the format changes the appearance but not the underlying value so even though you have made that format change, the cells will still contain the time component and that is very likely why you are getting #NUM!

One thing / point i think i'm missing is referencing the 'day' portion of 'day2date' and 'day' in column H's data retrieval.
That might need some clarification too. Don't forget my previous request about that.;)
Can you also please give us details about the named range Day2Date, including what value it holds and whether it is text or numeric?

In the interim, you could try
=INDEX('Raw Data'!$A$2:$A$500, SMALL(IF((Day2Date=INT('Raw Data'!$H$2:$H$500)), MATCH(ROW('Raw Data'!$H$2:$H$500), ROW('Raw Data'!$H$2:$H$500)), ""),ROWS('Raw Data'!$A$1:A1)))
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,589
Members
449,174
Latest member
chandan4057

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