DATEVALUE in INDEX/MATCH formula

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have the following formula which works well for my purposes:
{=IFNA(INDEX('Sbj vis summ3'!$M$2:$M$10000,MATCH(1,($B3='Sbj vis summ3'!$E$2:$E$10000)*($C$2='Sbj vis summ3'!$L$2:$L$10000),0)),"not found")}
How can I update it so that it returns a date for all meaningful matches; in other words, how do I embed the DATEVALUE operator in there? Currently meaningful finds are returned as in the image below, even after I format cells to "date".
 

Attachments

  • Capture10.PNG
    Capture10.PNG
    17.9 KB · Views: 5
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Figured out part of it, this was much easier than I thought :)
{=DATEVALUE(IFNA(INDEX('Sbj vis summ3'!$M$2:$M$10000,MATCH(1,($B3='Sbj vis summ3'!$E$2:$E$10000)*($C$2='Sbj vis summ3'!$L$2:$L$10000),0)),"not found"))}
Now it returns dates. BUT instead of "not found" it now returns #VALUE!
 
Upvote 0
Well if I amend it as follows it does work for both scenarios; however my impression is that the formula is unnecessarily complicated now:
{=IFERROR(DATEVALUE(IFNA(INDEX('Sbj vis summ3'!$M$2:$M$10000,MATCH(1,($B3='Sbj vis summ3'!$E$2:$E$10000)*($C$2='Sbj vis summ3'!$L$2:$L$10000),0)),"not found")),"not found")}
 
Upvote 0
You could get rid of the IFNA function, or change the values in col M to actual dates & then you won't need to convert them.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

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