#### makinmomb

##### Active Member
Is there a way to count shaded cells only , I am stranded in a case where I am waiting reply meanwhile I need to self sort myself with another indirect trick

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
No this is not possible.
If you do want to do this, you would need to write your own function. For example:

Code:
``````Function COUNTSHADED(rng As Range) As Long

Dim lngCount As Long
Dim CellA As Range

For Each CellA In rng
If CellA.Interior.Color <> 16777215 Then 'Blank interior
lngCount = lngCount + 1
End If
Next CellA

End Function``````

You can then use "=COUNTSHADED" function like any other function.

Hope this helps.
Brettster

Is there a way to count shaded cells only , I am stranded in a case where I am waiting reply meanwhile I need to self sort myself with another indirect trick
How did the cells get their shading... manually set or by means of Conditional Formatting?

How did the cells get their shading... manually set or by means of Conditional Formatting?

Manually

Need that because a case of mine is half way sorted, in case you get time it called Q2 Q3 Q3 ( COUNTING REPEAT CLIENTS ) , The below seems to be answer not working

=SUMPRODUCT(IF((ISNUMBER(D\$2:D\$11)*(COLUMN(D\$2:D\$11)-3<value(RIGHT(C14,1)))</value(ISNUMBER(E\$2:E\$11)*(COLUMN(E\$2:E\$11)-3<value(RIGHT(C14,1)))+(ISNUMBER(F\$2:F\$11)*(COLUMN(F\$2:F\$11)-3<value(RIGHT(C14,1)))>0,1,0),ISNUMBER(INDEX(\$D\$2:\$G\$11,0,VALUE(RIGHT(C14,1))))*(H\$2:H\$11>100000))

And how you update a new code ?

Replies
19
Views
822
Replies
1
Views
74
Replies
5
Views
185
Replies
6
Views
360
Replies
10
Views
142

1,196,508
Messages
6,015,613
Members
441,906
Latest member
gafoor

### 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.

### Which adblocker are you using?

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

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