+ Reply to Thread
Results 1 to 9 of 9

If probelm with time fields

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Angry If probelm with time fields

    Hi

    I have 2 colums which are formatted to time as follows: -

    Column A Column B
    08:30 17:00
    08:31 16:58
    08:25 17:05
    00:00 00:00


    In column C which is also formatted to time, I have tried to insert the following if function but am struggling with the results.

    =IF(A1="00:00",0,IF(A1>"8:30",0,"08:30"-A1))

    Using the above if function the results don't work for any cells in column A that are greater than 08:30 as it displays all ###### and then any cells that have 00:00 it displays 08:30.

    I would appreciate anybodies help on this as its driving me mad.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If probelm with time fields

    hi Sharon Hague, something like that perhaps?
    =IF(OR(A1=0,A1>TIME(8,30,)),0,TIME(8,30,)-A1)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: If probelm with time fields

    expand the column size, ####### indicates the date value wont fit the cell size...
    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: If probelm with time fields

    Also, all dates/times in excel are referenced from 0/0/1900 00:00 that is equal to zero, even though it displays as 0/0/1900 00:00...

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: If probelm with time fields

    Hi Sharon

    Has column B anything to do with this!

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-13-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: If probelm with time fields

    Brill - that works a treat thank you. The colmn width didn't work as this wasn't the issue. Thanks for all you advise.

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: If probelm with time fields

    Glad you got a solution
    However, the ######## in a cell does mean a date/time won't fit, if you expand the column, you might see what the problem is, rather than just saying that isn't the problem...
    Hope this helps

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: If probelm with time fields

    @ dredwolf

    As Sharon points out, there was no problem!

  9. #9
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: If probelm with time fields

    My profuse apologies!
    had it pointed out to me that a negative time ALSO creates the ###### situation, just had never seen it before...again, I apologize

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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