Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
matt clarke
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default 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" wrote in message
...
trying to show the nearest date to present date from chose of two cells



  #3   Report Post  
Posted to microsoft.public.excel.newusers
Sandy Mann
 
Posts: n/a
Default 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


with @tiscali.co.uk


"matt clarke" wrote in message
...
trying to show the nearest date to present date from chose of two cells



  #5   Report Post  
Posted to microsoft.public.excel.newusers
Sandy Mann
 
Posts: n/a
Default show nearst of two dates in new cell on excel

"Don Guillett" wrote in message
...
: 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


with @tiscali.co.uk




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
How turn on excel functn, dbleclick on cell 2 show reference? Dave Setting up and Configuration of Excel 1 November 24th 05 12:04 AM
EXCEL: IF CELL B6 RED, HOW DO I GET A "W" (ie for win)to show up Hose Excel Worksheet Functions 1 September 10th 05 09:32 AM
Getting Excel on new computer to show dates like on old MichaelC Excel Discussion (Misc queries) 2 August 22nd 05 10:43 PM
How can I show Feet and inches in a Excel cell? Magama13 Excel Discussion (Misc queries) 1 January 28th 05 03:27 PM


All times are GMT +1. The time now is 06:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"