Can CF cells be counted ?

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,404
Office Version
  1. 2007
Platform
  1. Windows
Hi,

I would like to know if it's possible the count CF cells ?

Here in the table below K16:T25 I have numbers that read in column, those are data corresponding to each number that are above from K4:T4.

Then under " Selection " I have numbers that are the result of selection from another sheet.

Which highlight the numbers per row.

My question is in the row ( Yellow ) from K27:T27 can the CF be counted ? Can a formula do the job ?

For example from K16:K25 9 cells are highlighted

L16:L25 8 cells are highlighted

M16:M25 6 cells are highlighted Etc....

Thank you for any help.
Excel Workbook
KLMNOPQRSTUVBOBPBQBRBS
412345678910Selection
15
161234567891012345
17445223166236991215182336445262
18227926131588375675361315222636
19192018221723162415252019221823
20343332313020212223242430313233
21191820172223162425151516171819
22202219231824251716152223182520
232022161523191817242524171520.
24162024151922182317252316202219
25222024251615191817232419182022
26
279867633313
Sheet
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I asked a similar question months ago about counting cells with an interior color and I had to use VBA to get it done. So I would have to say no to just a formula you will probably have to create one in VBA

Please check this link for more information about creating your own user defined function for counting colored cells, note from what I have read, you will not be able to do this when using CF colors. rather it suggest to define your count using the same formula you used to create the CF.

hope this helps.

User Defined Excel functions to determine cell colors

~DR
 
Last edited:
Upvote 0
Maybe a formula can come to the same result using the data from the " Selection " table for each number 1 to 10 for the table on the left ?

For example the number 1 in K4.

it would use the data from the " selection " table and count

1 in BO16
44 in BQ17
22 in BQ18
19 in BP19
19 in BS21
20 in BS22
20 in BR23
16 in BP24
and 22 in BS25 ?

to avoid a VBA which I know nothing about it ?

Thank you.
 
Upvote 0
Anyone have an idea for my last post ?
 
Upvote 0
Not sure what you mean by post #5 (or can't be bothered to work out the layout) so dealing with your table in post #1 what is the conditional format rule for column K?

Can you also explain why K4 is green in the table but not counted?
 
Upvote 0
Not sure but try

=SUMPRODUCT(($BO$16:$BS$16=K16)+(K17=$BO$17:$BS$17)+(K18=$BO$18:$BS$18)+(K19=$BO$19:$BS$19)+(K20=$BO$20:$BS$20)+(K21=$BO$21:$BS$21)+(K22=$BO$22:$BS$22)+(K23=$BO$23:$BS$23)+(K24=$BO$24:$BS$24)+(K25=$BO$25:$BS$25))
 
Upvote 0
Gaz_chops,

Thank you so much, your formula works like a charm, I really appreciate your help.

Serge.
 
Upvote 0
You're welcome, just for info. if the cells are highlighted using a formula, then they can probably be counted using a formula.
 
Upvote 0

Forum statistics

Threads
1,215,415
Messages
6,124,768
Members
449,187
Latest member
hermansoa

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