Closed Thread
Results 1 to 5 of 5

show nearst of two dates in new cell on excel

  1. #1
    matt clarke
    Guest

    show nearst of two dates in new cell on excel

    trying to show the nearest date to present date from chose of two cells

  2. #2
    Bob Phillips
    Guest

    Re: show nearst of two dates in new cell on excel

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

    --

    HTH

    Bob Phillips

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

    "matt clarke" <[email protected]> wrote in message
    news:[email protected]...
    > trying to show the nearest date to present date from chose of two cells




  3. #3
    Sandy Mann
    Guest

    Re: show nearst of two dates in new cell on excel

    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

    [email protected]
    [email protected] with @tiscali.co.uk


    "matt clarke" <[email protected]> wrote in message
    news:[email protected]...
    > trying to show the nearest date to present date from chose of two cells




  4. #4
    Don Guillett
    Guest

    Re: show nearst of two dates in new cell on excel

    : show nearst of two dates in new cell on excel


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Sandy Mann" <[email protected]> wrote in message
    news:u%[email protected]...
    > 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
    >
    > [email protected]
    > [email protected] with @tiscali.co.uk
    >
    >
    > "matt clarke" <[email protected]> wrote in message
    > news:[email protected]...
    >> trying to show the nearest date to present date from chose of two cells

    >
    >




  5. #5
    Sandy Mann
    Guest

    Re: show nearst of two dates in new cell on excel

    "Don Guillett" <[email protected]> wrote in message
    news:%[email protected]...
    >: 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:

    >>are 7 days apart then the formula can be shortened to show nearst of two
    >>dates in new cell on excel


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

    >>are 7 days apart then the formula can be shortened to show nearer of two
    >>dates in new cell on excel


    <g>

    --

    Sandy
    In Perth, the ancient capital of Scotland

    [email protected]
    [email protected] with @tiscali.co.uk



Closed Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1