Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple help with comparing dates in excel


i have this column B named
Update Time
2005080112:22:35
2005080112:46:20

and i have column F named
New Shift end
20050801 20:30
20050801 19:30


i need to compare column F and column B together.
if column F the time is greater than column B..then it will display
greater in column i..

how do i do that? anyone please help....thanks :P ur help is greatly
appreciated:)


--
forevercalz
------------------------------------------------------------------------
forevercalz's Profile: http://www.excelforum.com/member.php...o&userid=28931
View this thread: http://www.excelforum.com/showthread...hreadid=490097

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default simple help with comparing dates in excel

The following formula will convert the two strings into date serial values
(the first acts on column B, the second on column F)

formula 1
=DATE(LEFT(B1,4),MID(B1,5,2),MID(B1,7,2))&TIME(MID (B1,9,2),MID(B1,12,2),MID(
B1,15,2))

formula 2
=DATE(LEFT(F1,4),MID(F1,5,2),MID(F1,7,2))&TIME(MID (F1,10,2),MID(F1,13,2),0)

You can then apply a logical test to check if F is greater than be in column
I e.g......

=IF(formula2 formula1,"Greater","Less")

Combining them yields

=IF(DATE(LEFT(F2,4),MID(F2,5,2),MID(F2,7,2))&TIME( MID(F2,10,2),MID(F2,13,2),
0)DATE(LEFT(B2,4),MID(B2,5,2),MID(B2,7,2))&TIME(M ID(B2,9,2),MID(B2,12,2),MI
D(B2,15,2)),"Greater","Less")

Messy but it works !

--
Cheers
Nigel



"forevercalz"
wrote in message
...

i have this column B named
Update Time
2005080112:22:35
2005080112:46:20

and i have column F named
New Shift end
20050801 20:30
20050801 19:30


i need to compare column F and column B together.
if column F the time is greater than column B..then it will display
greater in column i..

how do i do that? anyone please help....thanks :P ur help is greatly
appreciated:)


--
forevercalz
------------------------------------------------------------------------
forevercalz's Profile:

http://www.excelforum.com/member.php...o&userid=28931
View this thread: http://www.excelforum.com/showthread...hreadid=490097



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple help with comparing dates in excel


i have a very very long list of data...so to compare ......will there b
a script to call all the columns in F to compare to column B....

--
forevercal
-----------------------------------------------------------------------
forevercalz's Profile: http://www.excelforum.com/member.php...fo&userid=2893
View this thread: http://www.excelforum.com/showthread.php?threadid=49009

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 Excel Dates Dashman Excel Worksheet Functions 5 March 17th 09 01:21 AM
Excel 2007 comparing dates Jeri Excel Discussion (Misc queries) 5 May 8th 08 04:08 PM
Comparing Dates fubdap Excel Discussion (Misc queries) 3 September 27th 07 03:53 PM
Mail Merging Dates from Excel - Word Simple Problem! CFD Excel Discussion (Misc queries) 1 July 13th 06 01:08 AM
Comparing dates Debbie F Excel Worksheet Functions 7 September 7th 05 11:57 AM


All times are GMT +1. The time now is 12:16 PM.

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"