LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating Dates From Text

Goal: I would like a cell to display a "Next" date by comparing text values
in one cell to "today".

Scenario: I have two cells. The first is a cell with multiple date values in
text format (YYYY/MM/DD). The other I was planning to be a Calculated cell
that I thought I'd use to compare the string of numbers and determine which
is the next in sequence after today's date. As there may be numbers in the
past I cannot just use the first item.

The cell of text looks like this:
2009-03-27 00:00:00
2009-04-10 00:00:00
2009-04-29 00:00:00
2009-05-13 00:00:00
2009-05-27 00:00:00

The calculated cell should output:
2009-04-10 00:00:00

Problem: I've been unable to figure out a calculation that will accomplish
this. The idea I had was to examine the text in pieces and compare them
numerically to "today" (as a number instead of a date). I'm not sure how to
do this though.

I'm not very adept with Excel functions. I've started with this:
"=(MID(A2,2,10))" but all it does is return the first item. I also tried
using a Replace function to get rid of the dashes and also one that would
return the dates as a decimal. But while I can get the numbers to change
format, I don't know how to do the compare...

Any help on this would be most appreciated!
 
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
Calculating due dates Dione Excel Worksheet Functions 3 December 5th 08 05:19 PM
Calculating With Dates Clark Excel Discussion (Misc queries) 2 May 13th 07 08:10 AM
Calculating dates Toby0320 Excel Worksheet Functions 11 July 18th 06 04:52 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
I need help calculating dates? jeda67 Excel Worksheet Functions 4 August 30th 05 02:14 PM


All times are GMT +1. The time now is 02:21 AM.

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"