DATEVALUE in INDEX/MATCH formula

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
128
Office Version
  1. 2016
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: 3
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
128
Office Version
  1. 2016
Platform
  1. Windows
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!
 

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
128
Office Version
  1. 2016
Platform
  1. Windows
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")}
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
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.
 
Solution

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
128
Office Version
  1. 2016
Platform
  1. Windows
Thanks, IFNA was removed and works well!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,587
Messages
5,637,234
Members
416,963
Latest member
samfuge

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