+ Reply to Thread
Results 1 to 4 of 4

IF formula to make different cells total

  1. #1
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30

    IF formula to make different cells total

    I am trying to create a formula for summing certain cells - but only if certain conditions are met. I have attached the worksheet to better help explain what I am trying to accomplish.

    Basically:
    If you achieved budgeted occupancy for this month you choose yes (Q20) and $500 appears in cell S21.

    If you exceed budgeted occupancy you would fill in that number in cell P28 and your commission would fill in cell S29.

    The problem arrives when I need to sum in cell V57. It needs to include either cells S21 or S29 but not both.

    The sum in V57 should be either a total of S21 and V51 OR S26 and V51 OR S28 and V51.

    Any help would be much appreciated - thanks in advance.

    D
    Attached Files Attached Files
    Last edited by AlmostAGeek; 02-04-2009 at 10:25 PM. Reason: add attachment

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF formula to make different cells total

    Quote Originally Posted by AlmostAGeek
    The sum in V57 should be either a total of S21 and V51 OR S26 and V51 OR S28 and V51.
    I think you need to elaborate on the above such that we can follow the logic... ie what is/are the rules to determine which of S21,S26,S28 are to be added to V51 ?

    On an aside... you can dispose of your lengthy double IF in S28 by using a LOOKUP, eg instead of:

    Please Login or Register  to view this content.
    use:

    Please Login or Register  to view this content.
    If you post back we can wrap this up quite quickly I suspect.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: IF formula to make different cells total

    I also noted that you use merged cells a lot. Be aware that aside form looking nice they can cause lots of trouble in formulas.
    Better get rid of them and format Horizontal as " center across selection".
    The sum in V57 should be either a total of S21 and V51 OR S26 and V51 OR S28 and V51.
    Did you not mean S29 instead of S28?
    Can there be values in two of the SXX cells at the same time ?

  4. #4
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30

    Re: IF formula to make different cells total

    I want to thank both of you for your suggestions.

    Since they were pressed for time it was decided that we were going to adjust the formula in S29 and reduce the dollar amounts by $500 each so the total would just come out right.

    In the mean time I want to take another look at this a do it the right way.

    And Arthur, you are correct, it should have been S29. No, only one SXX and V51 per total. We pay either S21 or S26 or S29 and V51. I will also work on getting rid of alot of the merged cells. What is the major difference in how Excel looks at those as opposed to center across selection?

    Thanks again, the time you spend is appreciated.

    D

+ 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