DATEVALUE in INDEX/MATCH formula

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
137
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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
137
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
137
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
57,030
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
137
Office Version
  1. 2016
Platform
  1. Windows
Thanks, IFNA was removed and works well!
 

Fluff

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

Watch MrExcel Video

Forum statistics

Threads
1,130,424
Messages
5,642,037
Members
417,251
Latest member
Dordrecht

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