COUNTIF and SUMIF formula with multiple criteria

excelnewb221

New Member
Joined
Dec 14, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello,

Would really appreciate some help on this, i've been struggling with it all day.
I've mostly tried variations of index/match, countifs, sumifs, but it i'm having trouble factoring in the different criteria, so i'm basically lost.
I'm basically looking to create two formulae. one that gives a count of negative and positive numbers based on criteria, and a second formula that gives a sum of those negative and positive numbers, based on the same criteria.
please let me know if i can explain or elaborate on the below better.
thank you for the help




Sheet1:
Book1
ABC
1FruitStatusFormula
2OrangeFreshif A2 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give a count all values not equal to 0 in column B of Sheet2
3AppleFreshif A3 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give a count all values not equal to 0 in column B of Sheet2
4BananaStaleif A4 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give a count all values not equal to 0 in column B of Sheet2
5StrawberryStaleif A5 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give a count all values not equal to 0 in column B of Sheet2
6BlackberryFreshif A6 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give a count all values not equal to 0 in column B of Sheet2
7
8
9if A2 of Sheet1 is in column A of Sheet2, and column B of Sheet1 equals column C of Sheet2, then give the sum of all values not equal to 0 in column B of Sheet2
Sheet1


Sheet2:
Book1
ABC
1FruitPriceStatus
2Strawberry-4Old
3Blackberry5Fresh
4Banana0Fresh
5Orange2Old
6Apple-8Fresh
Sheet2
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
How about
Book1
ABCD
1FruitStatusCountSum
2OrangeFresh00
3AppleFresh1-8
4BananaStale00
5StrawberryStale00
6BlackberryFresh15
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=COUNTIFS(Sheet2!$B$2:$B$6,"<>0",Sheet2!$A$2:$A$6,Sheet1!A2,Sheet2!$C$2:$C$6,Sheet1!B2)
D2:D6D2=SUMIFS(Sheet2!$B$2:$B$6,Sheet2!$B$2:$B$6,"<>0",Sheet2!$A$2:$A$6,Sheet1!A2,Sheet2!$C$2:$C$6,Sheet1!B2)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top