+ Reply to Thread
Results 1 to 8 of 8

Adding an error check to ISNUMBER formula

  1. #1
    Forum Contributor
    Join Date
    08-20-2009
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2013
    Posts
    149

    Adding an error check to ISNUMBER formula

    Hi all,

    The formulas below calculate if any additional hours are worked by a staff member on a particular day.

    =ROUND(IF(ISNUMBER(G39),H39-G39-'Hours Matrix'!D26-IF(AND(G39<0.500694444,H39>0.60416667),1/24,0),0)*96,0)/96

    =ROUND(IF(ISNUMBER(G19),H19-G19-'Hours Matrix'!D6-IF(AND(GI9<0.500694444,H19>0.60416667),1/24,0),0),15)

    I have listed both formulas above as though they both currently do what I ask I'm not sure if it would be easier to achieve what I would like with one over the other.

    Currently when a shift is entered in H-G cells which is shorter than the normal shift length for a staff member on a particular day (Hours Matrix D6/D26) the value returned is negative so ### is displayed. I would like the formula to return an error message stating the problem rather than just returning ###.

    Hope this makes sense,

    Thanks,

    Luke

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,251

    Re: Adding an error check to ISNUMBER formula

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



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,251

    Re: Adding an error check to ISNUMBER formula

    Oops, are you really using 2003?

  4. #4
    Forum Contributor
    Join Date
    08-20-2009
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2013
    Posts
    149

    Re: Adding an error check to ISNUMBER formula

    I bought Excel 2013 earlier today however the formula above is still returning a negative value if the shift is shorter than the length listed in Hours Matrix?
    Last edited by lukela85; 11-25-2013 at 10:35 AM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,251

    Re: Adding an error check to ISNUMBER formula

    You asked for an error check which is what you have. It would seem that you need to check your data. We can't do that for you, we don't have it.

    Regards, TMS

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

    Re: Adding an error check to ISNUMBER formula

    The IFERROR function doesn't catch the formatting error Excel has when working with negative time. You'll need something like

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

    You might be able to shorten that somewhat but hard to say without seeing data.
    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

  7. #7
    Forum Contributor
    Join Date
    08-20-2009
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2013
    Posts
    149

    Re: Adding an error check to ISNUMBER formula

    Excel is now saying the logical test is invalid.

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

    Re: Adding an error check to ISNUMBER formula

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] #VALUE error with IsNumber and IsFormula
    By Thomas J in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 11-12-2013, 06:37 PM
  2. Replies: 2
    Last Post: 10-28-2013, 03:52 PM
  3. cell.isNumber error
    By aloha31 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2013, 01:15 PM
  4. Help adding IF ISNUMBER in Proper location in Array Formula
    By fridgeymonster3 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-06-2011, 01:00 PM
  5. Check cell for data. Tried ISREF, ISBLANK, ISNUMBER, ISTEXT.
    By giallofever in forum Excel General
    Replies: 5
    Last Post: 03-24-2009, 02:22 PM

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