+ Reply to Thread
Results 1 to 13 of 13

Formula to Ignore Values (Not a =SUM formula)

  1. #1
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Formula to Ignore Values (Not a =SUM formula)

    Hi Microsoft chaps & Excel Guru's, a point to ponder over the weekend,

    I am currently working on a 3 shift rotation schedule for ($$) for a local company when I came across a problem that so far I have not been able to resolve without using a work around.

    I have a few formulas to perform a calculation from shift start & end times but the data supplied also includes text values such as "Off Sick, Vacation, etc, etc" and as you may know Excel returns #Value if a formula finds text within the calculation.

    After doing some research on-line no one seems to have an answer or a UDF that resolves this issue that doesn't include some kind of SUM formula, I know SUM formulas work but I don't need SUM or something like SUMPRODUCT (--( etc, yet, that will come later.

    My current solution has been to use a helper cell to define whether the cells in question are text or numbers by using a modified formula to include using that cell: (see attachment)

    =IF(ISNUMBER(L$9),IF(L9>0.1,IF(L8>L7,IF(MOD(L8+1/12,1)<=1/3,0,MIN(0.5833,L8)-IF(L8<=0.25,L7,MAX(L7,0.25))),MAX(0,0.5833-MAX(0.25,L7))+MAX(0,L8-0.25))*24,0))

    I can get this to work just fine but it also returns "FALSE" if there is text which I think is a bit messy and forces another work around solution.

    So my point is this, and this is for you Guru's:

    a) Why doesn't Microsoft create a function that does work ? - something like IGNORE-BLINDALLEYS-TEXT-VALUES() - because numbers and text ARE ubiquitous in Excel !!

    or

    b) Am I missing something in my formula ?

    or

    c) Does anyone know of a solution that doesn't include a helper cell or know of a UDF that works.

    or

    d) Should I just close my workbook and help the wife dig out the 3 million Christmas Decorations we seem to have

    Rant over

    The attachment shows what and where the issue is.
    Attached Files Attached Files
    Last edited by BlindAlley; 12-02-2016 at 01:34 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Have you considered using the IFERROR function?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Formula to Ignore Values (Not a =SUM formula)

    I have tried the IFERROR function without success, maybe my syntax was wrong ormore probably my frustration level was too high :-(

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    =IFERROR(your-formula,"")

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    L9=L8-L7
    becomes...
    =IFERROR(SUM(L8,-L7),"")
    copied across

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Then P10 (and the others in that row) become...
    =IF(P9="","",IF(P9>0.1,IF(P8>P7,IF(MOD(P8+1/12,1)<=1/3,0,MIN(0.5833,P8)-IF(P8<=0.25,P7,MAX(P7,0.25))),MAX(0,0.5833-MAX(0.25,P7))+MAX(0,P8-0.25))*24,0))
    (sure there is a simpler way to do that, too)

  7. #7
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Formula to Ignore Values (Not a =SUM formula)

    Quote Originally Posted by BlindAlley View Post
    =IF(ISNUMBER(L$9),IF(L9>0.1,IF(L8>L7,IF(MOD(L8+1/12,1)<=1/3,0,MIN(0.5833,L8)-IF(L8<=0.25,L7,MAX(L7,0.25))),MAX(0,0.5833-MAX(0.25,L7))+MAX(0,L8-0.25))*24,0))

    Hi,

    I think you have missed the Value_if_False in your first IF:

    P10
    =IF(ISNUMBER(P$9),IF(P9>0.1,IF(P8>P7,IF(MOD(P8+1/12,1)<=1/3,0,MIN(0.5833,P8)-IF(P8<=0.25,P7,MAX(P7,0.25))),MAX(0,0.5833-MAX(0.25,P7))+MAX(0,P8-0.25))*24,0),"abcd")


    SUM Function ignores text values, so this in P9:
    =SUM(P8)-SUM(P7)

    Regards,
    Khalid

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Quote Originally Posted by Khalidngo View Post

    =SUM(P8)-SUM(P7)
    That can all be done in 1 SUM...
    SUM(L8,-L7)

  9. #9
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Formula to Ignore Values (Not a =SUM formula)

    Thanks Ford, didn't saw your post.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Quote Originally Posted by Khalidngo View Post
    Thanks Ford, didn't saw your post.
    Not a problem, and thanks for the feedback

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Quote Originally Posted by Khalidngo View Post
    Thanks Ford, didn't saw your post.
    Not a problem, and thanks for the feedback

  12. #12
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Formula to Ignore Values (Not a =SUM formula)

    Awesome fellas, Sometimes I just get brain cramp after trying so many times to find a solution.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to Ignore Values (Not a =SUM formula)

    Happy to help

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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] Formula needs to ignore duplicate values
    By jimboryan in forum Excel General
    Replies: 1
    Last Post: 07-26-2015, 09:00 PM
  2. [SOLVED] Formula needs to ignore zero values.
    By Danny87` in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-04-2015, 11:05 PM
  3. Tweak IF formula to ignore some values
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-02-2013, 07:05 PM
  4. [SOLVED] Using an IF formula to ignore cells with certain values
    By JakeMann in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-14-2012, 07:57 AM
  5. Formula for Ignore Hide Values while making SUM ?
    By VICTOR5 in forum Excel General
    Replies: 3
    Last Post: 09-27-2011, 08:34 AM
  6. Replies: 5
    Last Post: 06-23-2010, 05:25 PM
  7. How do I ignore negative values in a formula
    By queestionable in forum Excel General
    Replies: 2
    Last Post: 08-16-2007, 10:26 AM

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