+ Reply to Thread
Results 1 to 4 of 4

Multible if statements with different cells and different criteria and different sums

  1. #1
    Registered User
    Join Date
    08-26-2018
    Location
    Narromine, Australia
    MS-Off Ver
    Office 365
    Posts
    47

    Multible if statements with different cells and different criteria and different sums

    So I would like to do something like this

    If AM5=1 then SUM(AG5:AL5) if not then SUM(AF5:AL5)

    I also want it to do this

    if AN5=1 then SUM($AF5-($AF5*0.2),$AG5:$AL5) if not then SUM(AF5:AL5)


    I can get it do add up my formula if I sperate it out. It's when I put it together that it has issues.

    so I have

    =IF($AN5=1,SUM($AF5-($AF5*0.2),$AG5:$AL5),SUM($AF5:$AL5)),IF($AM5=1,SUM($AG5:$AL5),SUM($AF5:$AL5))

    It returns an #VALUE! error.

    I think it is just a matter of moving some parentheses around or maybe I need to make it a nested IF. I just don't get what I'm doing wrong. I think I've been looking at it too long.

    hoping someone can help
    Last edited by Wolfieee; 02-03-2019 at 09:59 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607

    Re: Multible if statements with different cells and differnet criteria and different sums

    Please Login or Register  to view this content.
    Can $AN5 and AM5 =1 at the same time?
    alternatively:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-03-2019 at 09:00 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-26-2018
    Location
    Narromine, Australia
    MS-Off Ver
    Office 365
    Posts
    47

    Re: Multible if statements with different cells and differnet criteria and different sums

    Ah, I see where I went wrong. Thank a lot that will work and yes, I didn't think of that . They can =1 at the same time

  4. #4
    Registered User
    Join Date
    08-26-2018
    Location
    Narromine, Australia
    MS-Off Ver
    Office 365
    Posts
    47

    Re: Multible if statements with different cells and differnet criteria and different sums

    Just thinking about it. It should be okay because they will cancel each other out.

    It would not be able to do the af5-(AF5*0.2) if there is nothing to add/subtract

+ 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. Multible conditions to get multible values
    By Jopaha in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 05-19-2014, 03:07 PM
  2. Add formula to multible cells !
    By Petter120 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-05-2012, 06:59 PM
  3. Columns with differnet width cells
    By excelbobabc in forum Excel General
    Replies: 1
    Last Post: 08-13-2009, 10:17 PM
  4. Splitting A number into four differnet cells
    By Everquest in forum Excel General
    Replies: 8
    Last Post: 04-25-2007, 01:59 AM
  5. Counting cells that meet 2 differnet criteria
    By USChad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-07-2005, 03:05 PM
  6. [SOLVED] Conditional Formating multible if statements
    By Roy in forum Excel General
    Replies: 4
    Last Post: 07-22-2005, 05:05 PM
  7. Replies: 2
    Last Post: 04-25-2005, 07: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