Results 1 to 4 of 4

Comparing 2 different time formats?

Threaded View

mushin2003 Comparing 2 different time... 10-12-2011, 08:47 AM
Bob Phillips Re: Comparing 2 different... 10-12-2011, 08:57 AM
snb Re: Comparing 2 different... 10-12-2011, 09:10 AM
mushin2003 Re: Comparing 2 different... 10-12-2011, 10:18 AM
  1. #1
    Registered User
    Join Date
    10-11-2011
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Comparing 2 different time formats?

    Hi I am having trouble comparing 2 columns each containing a time value.
    The 1st column contains cells looking like this
    A6: 9/1/2011 8:47:07 AM

    the other column will have cells that look like this
    D6: 847

    I am working in VBA so would prefer to do this comparision in there but if it is easier to massage the cells prior to running my subroutine I will. I have taken cell A6 and split it into 2 cells which will look like
    A6: 9/1/2011 B6: 8:47

    Now I am unable to find a way to compare B6 to D6 having tried a few different ideas via cell formatting or converting values to "general" or numeric or pulling the data apart with text/left/right, etc. Also another idea that doesnt work is
    B6 =Hour(A6)&MINUTE(A6) -> the result is 80

    I am not sure it is relevant but the A6 field is formatted under Format Cells as "Time 13:30". The seconds are not needed.

    Any help or ideas are appreciated.
    Rob
    Last edited by mushin2003; 10-12-2011 at 10:16 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1