vlookup data range by date format

mdeanh5252

New Member
Joined
Sep 5, 2016
Messages
29
Hey all I have never needed to vlookup based on dates to return a result until now and i keep getting a #N/A result.
So what i want to do is lookup the item by date and return the result of the item
The equation im using is:
=vlookup(D1,A2:C4,1,false)

Cell D1 would have a date i wanted to lookup in my data range

my equation is in cell E1 to return result

My data layout is:
[TABLE="width: 192"]
<tbody>[TR]
[TD]Item[/TD]
[TD]count[/TD]
[TD]date[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD]52[/TD]
[TD]5/6/2017[/TD]
[/TR]
[TR]
[TD]Bananas[/TD]
[TD]36[/TD]
[TD]6/8/2017[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]75[/TD]
[TD]9/9/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]I moved the dates to column A and changed my row reference and the equation works fine.

Why do dates prevent return results as layed out above but when layed out in first column they return?
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
you need to address the left column, so your search in D1 could be the fruit. I think you need to use INDEX MATCH to get what you are after
 
Upvote 0

Forum statistics

Threads
1,223,933
Messages
6,175,477
Members
452,646
Latest member
tudou

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