show nearst of two dates in new cell on excel

B

Bob Phillips

=IF(ABS(A1-TODAY())<=ABS(B1-TODAY()),A1,B1)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
S

Sandy Mann

What if the two dates are the same amount of days away?

=IF(ABS(TODAY()-A1)=ABS(TODAY()-A2),"Either
Date",IF(ABS(TODAY()-A1)=MIN(ABS(TODAY()-A1),ABS(TODAY()-A2)),A1,A2))

If they can never be the same number of days away from today like if they
are 7 days apart then the formula can be shortened to:

=IF(ABS(TODAY()-A1)=MIN(ABS(TODAY()-A1),ABS(TODAY()-A2)),A1,A2)

--
HTH

Sandy
In Perth, the ancient capital of Scotland

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
S

Sandy Mann

Don Guillett said:
: show nearst of two dates in new cell on excel

Don,

Either you have lost me there or you are pointing out that it would have
been more correct for me to have written:

If it is the latter then watch out for Debra Dalgliesh who will no doubt
point out that it should have been:

<g>

--

Sandy
In Perth, the ancient capital of Scotland

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top