+ Reply to Thread
Results 1 to 5 of 5

IF(AND) Calculation

  1. #1
    Registered User
    Join Date
    03-29-2010
    Location
    Kyle, Texas
    MS-Off Ver
    Excel 2010
    Posts
    33

    IF(AND) Calculation

    Can someone please tell me what I have wrong here. I keep getting an error saying I have an error. Am I trying to make this too complicated?

    =IF(((D4=0,0,D4/D$137)*H$138)+IF((E4=0,0,E4/E$137)*H$139))


    This one works fine, but now we want to know what was collected in the 1-15 and 16-31, so I need to look at the totals separately not sum'd any longer, so I am trying to adjust the formula to the above.
    =IF(AND(D5=0,E5=0),0,(SUM(D5:E5)/SUM(D$137:E$137)))*H$137

    Thanks for your help.
    Last edited by Big_Tater; 04-21-2010 at 04:28 PM.
    David

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Problem with IF(AND) Calculation

    Does this do what you want?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-29-2010
    Location
    Kyle, Texas
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Problem with IF(AND) Calculation

    Quote Originally Posted by mdbct View Post
    Does this do what you want?
    Please Login or Register  to view this content.
    Perfect!! Problem solved!

    I see that I had too many (( )) in my formula.

    Thanks a lot for your help.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: IF(AND) Calculation

    Or just =D4 * H$138 / D$137 + H$139 * E4 / E$137
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-29-2010
    Location
    Kyle, Texas
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: IF(AND) Calculation

    Quote Originally Posted by shg View Post
    Or just =D4 * H$138 / D$137 + H$139 * E4 / E$137
    Thank you for the alternate solution "shg". Always nice to have multiple options.

+ 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