R
richardlpalmer
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!
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!