Pivot with Countifs

GordonLS

Board Regular
Joined
May 28, 2021
Messages
89
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Good morning. I have a pivot table that I am using to pull in costs. I have 3 columns A, B, C.
For each Category I need to charge $2.00 for each unique code with a unique Date.
For each Category if the code is not unique and the date is not unique than I also need to charge $10.00 for that group.
For each Category if the code is not unique and the date is unique I need to charge $2.00

The example column shows how these would be charged.
The count column is what I would need to say if cell =1 than will be $2.00 and if greater than 1 the charge will be $10.00

I need to populate column F with the category ,column G and J with the number of occurrences and column H and K with the charge.
 

Attachments

  • Picture3.png
    Picture3.png
    58.9 KB · Views: 4

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
would you be kind enough to help the forum help you and post a mini worksheet using the xl2bb add in. the link is below.
I cannot read the data in the image to build a test using your data.
 
Upvote 0
Here is an attempt:
Book1
ABCD
1
2BillIS8727_M2022-08-022
3JaneIS8728_L2022-08-022
4TomIS8727_M2022-08-0410
5HarryIS8727_M2022-08-0410
6SallyIS8728_M2022-08-052
7
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=IF(COUNTIFS($B$2:$B$6,B2,$C$2:$C$6,C2)=1,2,IF(COUNTIFS($B$2:$B$6,B2,$C$2:$C$6,C2)>1,10,2))
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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