• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Compound If Statement

rsomist

Member
I have a worksheet that I'm trying to get two IF functions developed based on criteria in other columns. I have been playing around with compounding the IF function with the Frequency and Sumproduct functions and keep coming up wrong and was looking to see if I could get some additional help.

Here's what I'm trying to accomplish and will attach file.

In column H - If the G column has a value of "I", then for every same value range in column F, I need a sum of column E filtering out any unique values from column B. In cell J2 I have a formula that shows all of the cells needed to get the answer - I'm just not sure how to get that in a function.

I also need a function in column I that says - If the G column has a value of "O", then for every same value range in column F, sum the values in column E filtering out any unique values from column A. In cell J20, I have another formula that shows all of the cells that are being added up to get the expected answer.

Thank you!
 

Attachments

  • Test Workbook 3.xlsx
    13 KB · Views: 6
Hi ,

See if this is correct ; there is a difference between what you have shown as the expected results and what I am getting.

Narayan
 

Attachments

  • Sample File.xlsx
    17.7 KB · Views: 7
Another option without helper

In H2, copied down :

=SUMPRODUCT((F$2:F$73=F2)/COUNTIFS(G$2:G$73,G$2:G$73,F$2:F$73,F$2:F$73,E$2:E$73,E$2:E$73,IF(G2="I",B$2:B$73,A$2:A$73),IF(G2="I",B$2:B$73,A$2:A$73)),E$2:E$73)

Regards
Bosco
 

Attachments

  • Sample File (1a).xlsx
    14.4 KB · Views: 6
Back
Top