Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-17-2019, 09:21 AM
alpha alpha is offline Add only cells colored yellow Windows 10 Add only cells colored yellow Office 2010 64bit
Novice
 
Join Date: Jun 2018
Posts: 18
alpha is on a distinguished road
Default

1. You don't need a function SumByColor because you don't want to sum numbers, but to count colors !
2. The function CountByColor that you have, is (for Excel) not based on the color but on the colorindex of the cells. The two colours green you use in your table, don't belong to the 56 colors of the colorindex. (For colorindex, see the helpfile of Excel and/or sheet2 in the attachment; the rownumber = the colorindexnumber of the corresponding cell).
So: either you must use a function that works for all (millions) colors, or you must use a function that only works with the 56 colors of the colorindex. I choosed the first way, so I have modified the function CountByColor in such a way that you can use it for all colors. See the attachment. Hope this helps.
Note: VBA-code can only used in .xlsm-files!
Attached Files
File Type: xlsm MSOfficeForums Paul18.xlsm (17.6 KB, 15 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add only cells colored yellow Extracting colored cells from one spreadsheet into another Kari Frey Excel Programming 7 09-15-2016 08:48 AM
hi I need total job in month In yellow zEr Excel 2 05-06-2016 03:55 PM
Add only cells colored yellow Populate D1 if A4 is yellow Tuph Excel 3 05-07-2015 02:25 AM
predefine thick border colored lines for highlighted cells dylansmith Excel 0 09-05-2014 07:49 AM
Text Highlighting in Yellow ??? mark4man Publisher 0 12-15-2005 06:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft