Count cells with fill color and retain code - Mr. Umlas Can you he

  • Thread starter Thread starter Counting Cells With Fill Color
  • Start date Start date
C

Counting Cells With Fill Color

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top