Counting occurrence with conditions

tayfunazakli

New Member
Joined
Mar 17, 2023
Messages
2
Office Version
  1. 2021
Hello

I'm trying to find a formula which checks 2 columns for a set of data and only count value in C depending on B.

For example on the attached picture, i would like to check for ''Location 1'' in cell B2 and Product ''2015'' in cell C2, if the same product ''2015'' appears again for the same location ''Location 1''. I've tried with countif but i could not manage to count value on C depending on the value on B. To extend the example, i'd like to check for ''Location 2'' in cell B4 and Product ''2012'' in cell C4, if the same product ''2012'' appears again for the same location ''Location 2.''

Can this be done with one formula which distinguishes the date on B and C, Counts only C and displays the result?

Thank you for your help

Tayfun
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    222.5 KB · Views: 7

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi & Welcome to MrExcel.

Edit:

Try

Book4
ABCDE
1DateLocationProductCount
2Location 120152
3Location 120161
4Location 120152
5Location 220152
6Location 220161
7Location 220152
8
9
10
Sheet1
Cell Formulas
RangeFormula
D2:D7D2=COUNTIFS(B:B,B2,C:C,C2)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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