We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
any vba/excel experts around
Options

dipsomaniac
Posts: 6,739 Forumite


anyone know how to count multicolour cells in excel?

i can count the single colours ok using vba script i found online. i am having trouble counting the purple/red & purple/yellow cells. any help appreciated.
this is the key for the spreadsheet

vba script

i can count the single colours ok using vba script i found online. i am having trouble counting the purple/red & purple/yellow cells. any help appreciated.
this is the key for the spreadsheet

vba script

"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson
0
Comments
-
First Google Result:
https://www.ablebits.com/office-addins-blog/2013/12/12/count-sum-by-color-excel/0 -
thanks neil. i did use google to get this far but can't see how i can count multicolour cells"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson0
-
How many cells are there of each of the multicolour types? What is the ColorIndex value of the multicolour cells?Retired at age 56 after having "light bulb moment" due to reading MSE and its forums. Have been converted to the "budget to zero" concept and use YNAB for all monthly budgeting and long term goals.0
-
thanks for reply
2 x purple/red
4 x purple/yellow
am just trying to find colorindex"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson0 -
Well, you've got it in the xcolor variable so you need to be able to output that somehow so that you can see what it is. I think you can use a watch on the value to see what the values are as you step through the code.
From the numbers I think it could be counting both types of multicolour cell as one, and returning 6 each time (i.e. 2 + 4).Retired at age 56 after having "light bulb moment" due to reading MSE and its forums. Have been converted to the "budget to zero" concept and use YNAB for all monthly budgeting and long term goals.0 -
could you not make just those two error ones brown and puce instead of a combination colour?0
-
"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson0
-
tempus_fugit wrote: »From the numbers I think it could be counting both types of multicolour cell as one, and returning 6 each time (i.e. 2 + 4).
pretty sure that's what is happening"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson0 -
could you not make just those two error ones brown and puce instead of a combination colour?
thanks, bank holidays are purple and annual leave red. when a/l is taken on a bank holiday i need both colours
probably is a better way of doing it"The Holy Writ of Gloucester Rugby Club demands: first, that the forwards shall win the ball; second, that the forwards shall keep the ball; and third, the backs shall buy the beer." - Doug Ibbotson0 -
Purple/Red = Magenta
Purple/Yellow = Brown
Use them instead?0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.8K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.8K Work, Benefits & Business
- 598.7K Mortgages, Homes & Bills
- 176.8K Life & Family
- 257.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards