Unique/conditional count formula

smclen

New Member
Joined
Jun 6, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I'm looking to calculate if there was an upgrade for a supplier, not the total count.

So, for each contract, for each supplier, was there an upgrade (regardless of the count/sum of upgrades)? If the result is yes, then the answer is 1.

sample.JPG


In the example above the count of the upgrades is 9, but the answer I am looking to generate is 4.

I am guessing to calculate this I would need a combination of IF, AND, COUNTIF, MAX, but I can't seem to put it together.

Can anyone please help me out?

Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Assumming your Upgrade Qty is in col "E"
Excel Formula:
=COUNTIF(E2:E16,1)
 
Upvote 0
Assumming your Upgrade Qty is in col "E"
Excel Formula:
=COUNTIF(E2:E16,1)
Thanks but I didn't explain my question well enough. I'm looking to count for each contract, for each supplier, was there an upgrade (e.g. >0). The exact number is the upgrade qnty column is irrelevant, only that it was >0.
 
Upvote 0
Us e the XL2BB download to post some actual data rather than a picture please
AND I'm guessing a pivottable might do this for you !
 
Upvote 0
Sorry I can't download it as I'm using a corporate laptop with strict controls on d/l files.

Hopefully this helps more. Column F is the formula calculation with the result, G is the formula text. I just need to add one more condition to this formula, as it currently does not account for the fact that Selk has no upgrades in row 15 or 16, so I need something that will return a result of 0 in F15 and F16.

excel formula.JPG
 
Upvote 0
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(A2:B16,D2:D16<>"")))
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Unique/conditional count formula
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,384
Members
449,080
Latest member
Armadillos

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