Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Count cells with fill color and retain code - Mr. Umlas Can you he

I copied some VBE code from
http://xldynamic.com/source/sld.ColourCounter.html and pasted it into the VBA
editor in my Excel spreadsheet. Then I used '=ColorIndex(cell)='color index
number' to find out what index number my color is. Then I used
'=SumProduct(--(COLORINDEX(cell range)='color index number')) to add up the
cells that have that color. This works great. However, when I save the
Excel document and then need to go back to it, I get a #name? error. Why is
this happening. I really would like to be able to use this code, but can't
figure out why it doesn't work correctly.

Thanks,

Pam Mahan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Count cells with fill color and retain code - Mr. Umlas Can you he

Pam

Press the F9 key to force calculation and it should work. Excel does not
recognise UDFs imediately unless they are installed in an AddIn.

Peter

"Counting Cells With Fill Color" wrote:

I copied some VBE code from
http://xldynamic.com/source/sld.ColourCounter.html and pasted it into the VBA
editor in my Excel spreadsheet. Then I used '=ColorIndex(cell)='color index
number' to find out what index number my color is. Then I used
'=SumProduct(--(COLORINDEX(cell range)='color index number')) to add up the
cells that have that color. This works great. However, when I save the
Excel document and then need to go back to it, I get a #name? error. Why is
this happening. I really would like to be able to use this code, but can't
figure out why it doesn't work correctly.

Thanks,

Pam Mahan

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to count cells in a range based on fill color? eehinmd Excel Worksheet Functions 2 March 16th 06 05:09 PM
How do I sort or count cells by fill color? Rob Excel Discussion (Misc queries) 2 December 23rd 05 09:37 PM
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? Moore New Users to Excel 1 June 15th 05 06:41 PM
Formula to count the cells in a range that have a fill color. Slainteva Excel Discussion (Misc queries) 2 January 19th 05 08:25 PM
Formula to count the cells in a range that have a fill color. Molly F Excel Discussion (Misc queries) 2 January 19th 05 06:15 PM


All times are GMT +1. The time now is 01:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"