# Formula to look for the longest date of several conditions based on certain criteria

1. ## Formula to look for the longest date of several conditions based on certain criteria

hi all,

I want to find the longest date from the column K,L,M,N ("date nonacr", "date od", "date due", "date branch") based on account number and downloade date. If there is a decrease in outstanding, then the oldest date only sees from the column "date nonacr", "date due "and" date branch "only,
but use result " (blank) " if there no date date in coloumn K,L,M,N or if there is a date in the "date od" column but there is a decrease in outstanding
or there is a decrease in outstanding but the date in column "K" or column "M" or column "N" is younger than the date in the column "Download_Date" .

note : data sample already attached.

regard
dolphino

2. ## Re: Formula to look for the longest date of several conditions based on certain criteria

one option which would mirror your expected results

I4: =IFERROR(1/(1/IF(Q4,IF(L4=MIN(K4:N4),0,MIN(K4,M4:N4)),MIN(K4:N4))),"(blank)")
copied down

3. ## Re: Formula to look for the longest date of several conditions based on certain criteria

hi XLent

thanks for your help, the formula is as I expected.

regards

dolphino

4. ## Re: Formula to look for the longest date of several conditions based on certain criteria

There are currently 1 users browsing this thread. (0 members and 1 guests)