Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Comparing two dates using between.

On Apr 23, 7:17 am, BerkshireGuy <berkshireguy2005-
wrote:
I have some data where each row has a date in the format of 20050101,
20060423, etc.

I wanted to create a pivot of this data, but have groups depending on
which date range they fall under.

From other projects, I figured the best way to do this is have a new


column called date group and then having a comparision to indicate
which group it falls under.

I first need to reformat the date as 01/01/2005 and then do a between
comparision - i.e. Between 01/01/2005 and 03/01/2005 would get placed
the 01/01/2005 - 03/01/2005 group.

I'm assuming something with date serial?

Any ideas?

Thanks,
Brian


Assuming that a sample date is in cell A1, you could use the following
function:

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

Matt

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
Comparing dates Gareth.Evans Excel Worksheet Functions 0 March 26th 09 08:54 AM
Comparing dates Gareth.Evans Excel Worksheet Functions 3 March 25th 09 07:05 PM
Comparing Dates fubdap Excel Discussion (Misc queries) 3 September 27th 07 03:53 PM
Comparing dates Debbie F Excel Worksheet Functions 7 September 7th 05 11:57 AM
comparing dates Myriam Excel Programming 3 October 11th 04 04:49 AM


All times are GMT +1. The time now is 12:12 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"