Tag some cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have no idea if this is possible. What I want to do is to be able to tag
some cells in a column and do a SUM on those tagged cells only. How can I do
this?

For tagging I was thinking of changing the background color of the cells to
yellow for example. That's what I prefer. Then I thought of using SUMIF but
how can I check the background color of a cell in the criteria?

Thanks
 
There is an example of using SUMPRODUCT and UDFs to count coloured cells at
http://www.xldynamic.com/source/xld.ColourCounter.html

The biggest problem is that changing a colour does not generate a worksheet
recalculation. One way around this is to use a button to set the colour, and
in the code associated with the button, do a sheet calculate
(ACtivesheet.Calculate). You would also need to add Application.Volatile to
the UDF.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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