Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default 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
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
Days360() is only approximate Paul Excel Discussion (Misc queries) 3 August 11th 09 03:00 AM
Approximate match on string of text Pierre Excel Worksheet Functions 7 May 16th 09 10:27 PM
how to look up an approximate value in two columns Deise BR Excel Worksheet Functions 3 August 18th 07 11:29 PM
Approximate matches with vlookup? Keith R Excel Worksheet Functions 2 March 30th 07 06:09 PM
How do i approximate the value of a point on the trendline? Dheer Charts and Charting in Excel 2 January 7th 05 02:00 AM


All times are GMT +1. The time now is 04:02 PM.

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

About Us

"It's about Microsoft Excel"