Forum Discussion

cmckernan93's avatar
cmckernan93
Copper Contributor
Jul 26, 2022
Solved

HELP - conditional summing a field based on a product number and week number from another table

Hello 

 

I have attached 2x sheet screenshots below - one called 'target' which I want to put the formula in and one called ''source' which is where is want to pull the info from 

 

What is the right formula/function to use sum the amount of complaints

(column H in "Target" by customer UPC column b in "target")

 

I want to sum the complaints form source but this is dependent on the customer UPC and w/e date - these values should match and shared in both sheets below 

  • cmckernan93 

    The formula in ABC!M2 is

     

    =IF(OR(O2="Positive"),"0",IF(OR(O2="Negative"),"1"))

     

    • "0" and "1" are text values, not numbers. You should use 0 and 1 instead.
    • There is no need to use OR here
  • cmckernan93 

    How about

    =SUMIFS(ABC!$M$2:$M$1000, ABC!$D$2:$D$1000, B2, ABC!$L$2:$L$1000, E2)

     

    Adjust the ranges if you have more than 1000 rows of data.

    • cmckernan93's avatar
      cmckernan93
      Copper Contributor

      HansVogelaar 

       

      thanks 

       

      it's still giving me a '0' value so the formula is working just not picking up my value in the 'source' column 

       

      is there anything else i am doing that could be causing the error?

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        cmckernan93 

        Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Thanks in advance.

Resources