Count cells by color and get "#NAME?"

Ucpaul

New Member
Joined
Dec 15, 2012
Messages
45
I appreciate any explanation to this:

I use: =ColorFuction($A$1,B1:B10,FALSE) to count number of cells in B1:B10 that have the same color as cell A1. When I typed in this formula in Excel 07, I alway got #NAME?

I typed in the same formula the other day and it worked fine. Anything wrong with my formula, or do I need to press other key rather than "Enter" key?

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
the reason why you #NAME is because its a UDF (User Defined Formula)
This formula would work only in the sheet in which this code for this formula has been saved
 
Upvote 0
Could you explain or show me how to go around this or to make it work. I'm new to VBA.

Thanks for help.
 
Upvote 0
DO you have the code with you?
WOuld you want this to work only in one file or would you want this to be working in all the files?
 
Upvote 0
I don't know how to get that code? (again, I'm a VBA beginner).

Could you show mw both ways?

Thanks.
 
Upvote 0
Glad you could solve it :) Suggest you to post the solution that worked for you. So that people may get benefitted from it in future
 
Upvote 0
I used the link that you suggested, then copy the code (for color count) onto a customer define module in my spreadsheet.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,519
Members
448,968
Latest member
Ajax40

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