I'm a little confused and not sure how column B
is relevant in your example formula since you didn't mention it (or your IF
condition) in your explanation.
So outside of of that, if just want the most recent date, for example, for CK4:CM4
, then you'd simply use =MAX(CK4:CM4)
.
This works fine even with the rows that have a cell containing the text N/A
. It's only an issue when all 3 date cells for that row are 'N/A', in which case it will return 0
(which, if formatted as a date, displays as 1900-01-01
) but a simple IF
will deal with that, like for row 5:
=IF(MAX(CK5:CM5)=0,"unknown",MAX(CK5:CM5))
...replacing unknown
with whatever you want it to return in that case.

If you meant that you needed the most recent date out of all rows for those 3 columns, you'd use =MAX(CK:CM)
which returns 2021-06-04
using your sample data.