Home |
Search |
Today's Posts |
#1
|
|||
|
|||
is it possible to sort by approximate date?
Greetings,
I am creating a log for photos with varying levels of detail: - some have firm dates (dd/mm/yyyy) - some have mm/yyyy - some have no date, so I am forced to approximate, e.g. early 1930s, mid 1940s, etc. Is it at all possible to include this last category in a date column without having to cut and paste these entries by hand? Thank you |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
is it possible to sort by approximate date?
On Tue, 22 Oct 2013 21:30:47 +0100, ernstblofeld wrote:
Greetings, I am creating a log for photos with varying levels of detail: - some have firm dates (dd/mm/yyyy) - some have mm/yyyy - some have no date, so I am forced to approximate, e.g. early 1930s, mid 1940s, etc. Is it at all possible to include this last category in a date column without having to cut and paste these entries by hand? Thank you Yes it is. You would use a formula that would either pick up the year, if it is a true date, or the contiguous four digit groups, if it is not (and if there were no other contiguous four digit groups in your strings; if there were, more logic would be needed). If your version of Excel is 2007 or later, and your date is in A2, for example, you could use: =IFERROR(YEAR(A2),LOOKUP(9.9E+307,--MID(A2,ROW(INDIRECT("1:"&LEN(A2)-3)),4))) And fill down as needed. If that doesn't work, you will need to supply the details as to the nature of your data. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
is it possible to sort by approximate date?
On Wed, 23 Oct 2013 12:43:38 -0400, Ron Rosenfeld wrote:
On Tue, 22 Oct 2013 21:30:47 +0100, ernstblofeld wrote: Greetings, I am creating a log for photos with varying levels of detail: - some have firm dates (dd/mm/yyyy) - some have mm/yyyy - some have no date, so I am forced to approximate, e.g. early 1930s, mid 1940s, etc. Is it at all possible to include this last category in a date column without having to cut and paste these entries by hand? Thank you Yes it is. You would use a formula that would either pick up the year, if it is a true date, or the contiguous four digit groups, if it is not (and if there were no other contiguous four digit groups in your strings; if there were, more logic would be needed). If your version of Excel is 2007 or later, and your date is in A2, for example, you could use: =IFERROR(YEAR(A2),LOOKUP(9.9E+307,--MID(A2,ROW(INDIRECT("1:"&LEN(A2)-3)),4))) And fill down as needed. If that doesn't work, you will need to supply the details as to the nature of your data. My answer was incomplete. The result of that formula is the year, which you could sort by If you want to sort by the actual date, and all of the dates are not ealier than 1/1/1900, then use this formula instead: =IFERROR(--A2,DATE(LOOKUP(9.9E+307,--MID(A2,ROW(INDIRECT("1:"&LEN(A2)-3)),4)),7,1)) =IFERROR(--A2,IF(LOOKUP(9.9E+307,--MID(A2,ROW(INDIRECT("1:"&LEN(A2)-3)),4))<1900," <1900",DATE(LOOKUP(9.9E+307,--MID(A2,ROW(INDIRECT("1:"&LEN(A2)-3)),4)),7,1))) If will check that the dates are in the range Excel can use, and convert those "approximates" to July 1 of the year. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Days360() is only approximate | Excel Discussion (Misc queries) | |||
Approximate match on string of text | Excel Worksheet Functions | |||
how to look up an approximate value in two columns | Excel Worksheet Functions | |||
Approximate matches with vlookup? | Excel Worksheet Functions | |||
How do i approximate the value of a point on the trendline? | Charts and Charting in Excel |