[xpost][/xpost]
Experts,
I am looking for a code i have attached a file where summary sheet have count of all sheets for both RGB(244, 204, 204) & RGB(183, 225, 205) Columns wise.
Please make same format as Summary sheet have.
[xpost][/xpost]
Experts,
I am looking for a code i have attached a file where summary sheet have count of all sheets for both RGB(244, 204, 204) & RGB(183, 225, 205) Columns wise.
Please make same format as Summary sheet have.
What do you mean?
I want to count the color of cell column wise with given RGB's .
For Example
The code will count the two colors for used column across all sheets and will create summary sheet then paste the result there with sheet names and headers.
Same as summary sheet is looking like.
There is no code in the example.
Yes there is not code but looking for.
I still don't understand what you are summarising. The attached workbook contains a VBA Function to count, average or sum coloured cells
I'll check back tomorrow now.
My sheet has no code. i made the sheet manually.
I am looking for VBA code which will count 2 color from all worksheets used Columns till last row and then paste the result in summary sheet.
First Code will count sheet columns till last row (those cell which are colored)
second Code will create summary sheet
third Code will paste each sheet Header separately in summary sheet, with sheet name as i made manually in summary sheet and there count result.
There are two colors in my sheets which i want to count that are Green and Pink and here is RGB(244, 204, 204) & RGB(183, 225, 205).
Each sheet headers are same that are names in sheet 1 2 3 4 5 6 7 8 9 10 11 12 13 14 so on these are headers.
I want to count how many green and pink color is in header 1 and so on.
I have made a summary sheet manually but want a code which will make the summary sheet automatically and paste the Green and Pink count
[xpost][/xpost]
chandoo.org/forum/threads/code-required.44584/
This is your final warning about the Forum Rules. I will ban you from the Forum next time.
Yeah Noted but any solution can given.
Or
Please make this code correct.
Public Sub CountColorCells()
'Variable declaration
Dim rng As Range
Dim lColorCounter As Long
Dim rngCell As Range
'Set the range
Set rng = Sheet2.Range("J2:J1000")
Set rng = Sheet2.Range("K2:K1000")
Set rng = Sheet2.Range("L2:L1000")
Set rng = Sheet2.Range("M2:M1000")
Set rng = Sheet2.Range("N2:N1000")
Set rng = Sheet2.Range("O2:O1000")
Set rng = Sheet2.Range("P2:P1000")
Set rng = Sheet2.Range("Q2:Q1000")
Set rng = Sheet2.Range("R2:R1000")
Set rng = Sheet2.Range("S2:S1000")
Set rng = Sheet2.Range("T2:T1000")
Set rng = Sheet2.Range("U2:U1000")
Set rng = Sheet2.Range("V2:V1000")
Set rng = Sheet2.Range("W2:W1000")
Set rng = Sheet2.Range("X2:X1000")
Set rng = Sheet2.Range("Y2:Y1000")
Set rng = Sheet2.Range("Z2:Z1000")
'loop throught each cell in the range
For Each rngCell In rng
'Checking Yellor color
If Cells(rngCell.Row, rngCell.Column).DisplayFormat.Interior.Color = RGB(183, 225, 205) Then
lColorCounter = lColorCounter + 1
End If
Next
'Display the value in cell
Sheet2.Range("J1") = lColorCounter
Sheet2.Range("K1") = lColorCounter
Sheet2.Range("L1") = lColorCounter
Sheet2.Range("M1") = lColorCounter
Sheet2.Range("N1") = lColorCounter
Sheet2.Range("O1") = lColorCounter
Sheet2.Range("P1") = lColorCounter
Sheet2.Range("Q1") = lColorCounter
Sheet2.Range("R1") = lColorCounter
Sheet2.Range("S1") = lColorCounter
Sheet2.Range("T1") = lColorCounter
Sheet2.Range("U1") = lColorCounter
Sheet2.Range("V1") = lColorCounter
Sheet2.Range("W1") = lColorCounter
Sheet2.Range("X1") = lColorCounter
Sheet2.Range("Y1") = lColorCounter
Sheet2.Range("Z1") = lColorCounter
End Sub
Display More
Have you noted this, because you don't seem too interested!!
Yes i have seen the warning that is obviously not good at all. I was just looking for solution.
and the thing is i have been warned for cross posting but none of the them have posted solution and comments related to post. that means post has been closed.
Don’t have an account yet? Register yourself now and be a part of our community!