+ Reply to Thread
Results 1 to 5 of 5

IF Statement using errors

  1. #1
    Registered User
    Join Date
    07-29-2011
    Location
    London
    MS-Off Ver
    Excel 2002-03
    Posts
    2

    Exclamation IF Statement using errors

    Can anyone help me with this IF Statement?

    I am currently constructing a sheet to work out total hours from a “Time in” cell and a “Time out” cell. Now I need the If statement because if someone was to input an earlier time out than the time in then this would generate a negative figure which then replaces the total hours cell with “##########”

    So far I had several combinations but this being just one example:

    =IF(G11-F11="ISERROR","CHECK TIME",G11-F11)

    I’ve broken down below what the cells represent

    =IF(TIME IN–TIME OUT= the error ####, “CHECK TIME”, TIME IN – TIME OUT)

    I tried various symbols and words to represent the #### error. I could not find anything similar on the net.

    Basically If the negative error appears because of incorrect times being imputed I want the cell to say “Check Time” so to notify the user. Obviously if there is no error then I just want the original total hour calculation.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: IF Statement using errors

    Plz test the formula
    =IF(iserror(G11-F11),"CHECK TIME",G11-F11)

    Or
    =IF(G11-F11<0,"CHECK TIME",G11-F11)

    I am confusing to understand your explaitation, so giving two options that you can get
    Last edited by tigertiger; 07-29-2011 at 10:03 AM.
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Statement using errors

    Try

    =IF(ISERROR(G11-F11),"CHECK TIME",G11-F11)
    Does that work?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-29-2011
    Location
    London
    MS-Off Ver
    Excel 2002-03
    Posts
    2

    Re: IF Statement using errors

    Thanks for the speedy reply, but unfortunately I have already tried these combinations

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Statement using errors

    Then your problem is elsewhere. Can you upload a spreadsheet with a simple example in it (Go Advanced>Manage attachments)?

+ Reply to Thread

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