+ Reply to Thread
Results 1 to 8 of 8

Help with IF formula

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    29

    Help with IF formula

    I am in need of some assistance with an if formula that is not working for me. I am guessing the issue is with my parentheses. Below is my original formula that works when data is input, and then below that is my unsuccessful attempt at the formula to have a - inserted when there is no data on the table.

    Original Formula - =((T118/SUM(T118:T132))*0.41)*100

    Unsuccessful IF formula - =if(iserror((T118/SUM(T118:T132))*0.41)*100),”-“, (T118/SUM(T118:T132))*0.41)*100))

    Any assistance would be greatly appreciated.

    Greg

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Help with IF formula

    =iferror(((t118/sum(t118:t132))*0.41)*100),"-")

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

    Re: Help with IF formula

    Try

    =IF(ISERROR((T118/SUM(T118:T132))*0.41*100), "-", (T118/SUM(T118:T132))*0.41*100)

    With Excel 2013, you could use IFERROR
    =IFERROR(T118/SUM(T118:T132)*0.41*100, "-")
    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
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Help with IF formula

    Quote Originally Posted by BadlySpelledBuoy View Post
    =iferror(((t118/sum(t118:t132))*0.41)*100),"-")
    Thank you for the reply but it is telling me "There are to few functions for this argument"

  5. #5
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Help with IF formula

    Quote Originally Posted by ChemistB View Post
    Try

    =IF(ISERROR((T118/SUM(T118:T132))*0.41*100), "-", (T118/SUM(T118:T132))*0.41*100)

    With Excel 2013, you could use IFERROR
    =IFERROR(T118/SUM(T118:T132)*0.41*100, "-")
    This seem to have worked. I used the 2013 formula.

    with out having the parentheses around the *.41 and *100, how does it know to calculate them in the correct order?

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

    Re: Help with IF formula

    It uses the "Please Excuse My Dear Aunt Sally" method (Parentheses, Exponents, Multiplication and Division, Addition and Subtraction.
    Unless you wanted the 0.41 or the 100 in the denominator of the previous term, it doesn't matter if it does the multiplication or division first.
    Sometimes parentheses are just nice to have to break things up a little and make them clearer.

  7. #7
    Registered User
    Join Date
    05-29-2014
    Location
    Indiana, USA
    MS-Off Ver
    Office 2010
    Posts
    15

    Re: Help with IF formula

    Quote Originally Posted by BitterGreg View Post
    This seem to have worked. I used the 2013 formula.

    with out having the parentheses around the *.41 and *100, how does it know to calculate them in the correct order?
    A small little addition to keep in mind. When parentheses are not required AND you are having a problem with excel, nuke them. I have had excel throw tantrums over extra parentheses more than once. Even if they are technically correct, sometimes excel tries to read them as functional parentheses rather than arithmetic parentheses.

    In the case above, as was posted by the guy above me, Multiplication is commutative just as addition is. 5*.41*100 is exactly the same as 5*100*.45 just as 1+2+3=1+3+2 Don't let the 'division by multiplication' thing confuse you. That .41 is already 41/100 and so the non-commutative portion of the arithmetic expression is already solved. Multiplying by .41 is like putting the 41/100 inside parentheses.

    Don't worry about the arithmetic stuff, I have been through several years of college calculus and still screw up addition on a regular basis.

    Cheers!

  8. #8
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Help with IF formula

    Thank you everyone that really helped

+ 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. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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