Vlookup - text date cell

dunmore83

Well-known Member
Joined
Aug 24, 2011
Messages
540
Hi,

I have a simple Vlookup formula as follows;

=VLOOKUP(D4,'Milk-Prices'!$G$10:$S$21,4,0)

However D4 is formatted as a date text cell as follows;

="DAILY INCOME RESULTS - "&TEXT('P01-Summary'!M20,"dd mmm yy")

The vlookup formula is returning #N/A however if I simply format cell D4 as a straight date cell (i.e. [$-C09]dd-mmm-yy;@) the vlookup function works.

Is there a workaround here so the vlookup works when referencing a cell with text that is formatted as a date cell ?

Thanks
 

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).

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,945
Office Version
  1. 365
Platform
  1. Windows
Hi, can't you use the unformatted date from the P01-Summary sheet? i.e.

=VLOOKUP('P01-Summary'!M20,'Milk-Prices'!$G$10:$S$21,4,0)
 
Upvote 0

Forum statistics

Threads
1,195,640
Messages
6,010,876
Members
441,571
Latest member
stolenweasel

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
Top