Differentiating data to create pivot table

jonybandana

New Member
Joined
Dec 16, 2022
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hello. So I have the following table:

1708105571991.png


I am posting an image because formatting is important.

I would like to generate a pivot table that looks like this:

WIRESJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
1029​
1​
1022​
1​
1​
1034​
1​

Basically, this table should tell me how many 1029 wires I need to use (considering they only need to be used when the cell is green). Is there a way I can generate this using a pivot table? If I use a count table like this:

Row LabelsSum of MARSum of APRSum of MAYSum of JUNCount of JUL
1022
1​
2​
1​
1029
1​
1034
1​
1​
Grand Total
1​
2​
3​
1​

Because it is also counting the instances in which it is blue, and I should use tires instead of wires.

Is there any way in which I can tell the pivot table to only count blue colored cells? Or do I have to differentiate the values in the table for excel to be able to differentiate them?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
What is the rule for making the cell fill color green? If that is a CF rule, or a consistent rule you manually apply EVERY time, then that can be of use.
 
Upvote 0
What is the rule for making the cell fill color green? If that is a CF rule, or a consistent rule you manually apply EVERY time, then that can be of use.
It is a manual rule, there is no condition for it. If it helps, one could be created, since green always follows an empy cell and green always follows a number value (from left to right).
 
Upvote 0
Well, that is consistent. But, what if there are 3 or more consecutive numbers?
So you mean blue follows a number value?

So, if there are two consecutive numbers following a blank cell, the first is green and the second is blue.
 
Upvote 0
Well, that is consistent. But, what if there are 3 or more consecutive numbers?
That does not happen. The numbers are fixed and don't change, and they are not like that. However, the parts (wires, tires, etc.) do change and are added constantly, so that would not be a worry.
 
Upvote 0
Will this do what you need:

Cell Formulas
RangeFormula
C1:M1C1=EDATE(B1,1)
B8:M11B8=AND(N(A2)=0,B2>0)
B14:M14B14=$B$1:$M$1
A15:A17A15=SORT(UNIQUE($N$2:$N$5,FALSE,FALSE),1,1)
B15:M17B15=SUM(($A$2:$L$5=0)*($B$2:$M$5=1)*(MONTH(B$14)=MONTH($B$1:$M$1))*($A15=$N$2:$N$5))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:M5Expression=AND(N(A2)=0,B2>0)textNO
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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