Identify right most date with conditions

The Grim Discovery

Board Regular
Joined
Jan 23, 2015
Messages
241
Office Version
  1. 365
Platform
  1. Windows
Hello Excel people

I've got a simple 6 column table like the one below.
Columns A - E contain mostly dates.
Column F copies the right-most date by using the following formula: =LOOKUP(2,1/(A2:E2<>""),a2:e2)
Which works fine when only dates are input. But I've recently had cause to introduce 'N/A' and 'Nil' as possible input options as well as dates. And this causes a problem for me in Col F because, as in the example below, it's no longer telling me the most recent date (which should be 12/12/22 from Col D) but is copying the cell contents of Col E and returning 'Nil'.

Can anyone help with adapting/overhauling the formula so it ignores instances of 'N/A' and 'Nil' and only recognises dates?

Lots of thanks in advance.

ABCDEF
Date 1Date 2Date 3Date 4Date 5Most recent date
1/6/225/7/2210/8/2212/12/22NilNil
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=LOOKUP(2,1/(ISNUMBER(A2:E2)),A2:E2)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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