Count + Sum Cells based on Cell Colour in Excel – How To

One of the most sought after feature among heavy Excel users i.e. count or sum cells in Excel based on cell background color. I really wish we had a formula or a feature that does it for us but it isn’t available yet. But we do have the solution if we turn to VBA and write few lines of code.

View Contents

Count or Sum cells based on color using Excel filter

Yes! We can use Excel filter to do this if we couple it with the appropriate formula. Your usual COUNT or SUM functions won’t help in this case. This is because Excel filter simply hides the result not fulfilling the criteria and both COUNT and SUM functions consider hidden and visible data therefore, we need a function that processes only visible data and ignore the hidden one.

This is where we meet SUBTOTAL function. This approach is especially good for those who want to avoid getting into VBA.

Step 1: For this approach we need the data to have headings. If data does not have headings already then its suggested to have heading inserted for each column at the top by adding a new row or at least for the column containing colored cells.

Step 2: Selected the cells containing headers and go to Data tab > in sort and filter group click Filter button and you will see drop-down arrows added to the heading cells.

Step 3: Move to the last cell of column containing colored cells. You can do that quickly by simply having an active cell within in that column and hitting CTRL+DownArrow. Move one cell down further and put the following formula for count:

=SUBTOTAL(2,B2:B10)

I had my data in range in cells B2 through B10 only that is why formula contains just that.

Step 4: Click the drop-down arrow button of the column containing colored. A menu will appear and in there hover the cursor over filter by color option and select the desired. This will filter the data down to those cells that contain the selected color only.

If you want to sum the values in specific colored cells you need to change the formula a little as following:

=SUBTOTAL(9,B2:B10)

However, this approach is quite limited. As you can process only on one color at a time. If you have more than one color in large data set, and you want to count, sum or average specifically colored data then much better and faster approach is by making a simple UDF in VBA.

Count cells based on color using VBA

For this we need a UDF i.e. user defined function. Following are the steps:

Step 1: Hit ALT+F11 shortcut key to enter visual basic environment

Step 2: Once you are inside visual basic editor go to Insert > module to insert a new module.

Step 3: Double click newly created module and a new blank window will open on the right. Copy the following code and paste it inside empty window:

Function CountColor(color As Range, data_range As Range)
 Dim dRange As Range
 Dim dColor As Long
dColor = color.Interior.ColorIndex
For Each dRange In data_range
 If dRange.Interior.ColorIndex = dColor Then
 CountColor = CountColor + 1
 End If
Next dRange
End Function

Step 4: The above code has now given you a new function to use named CountColor. Just provide the cell address containing the color you want to use as count criteria and then provide the range of data to process.

Following illustration will walk you through the process:

And you can count for multiple colors at once as well:

Understanding VBA code

Lets understand what the code is about and what are we achieving with it.

Line 1:
Function CountColor(color As Range, data_range As Range)

Keyword “Function” tells Excel that we want to initiate UDF with the name “CountColor”. Inside bracket we required two arguments; “color” and “data_range” and both are of type range meaning we have to mention either a cell address or a range of cells. In descriptive manner the formula is following:

CountColor(cell address with the background color you want to use as criteria, range of cells you want to check for color selected and count)

Remember we have defined two variables color and data_range. But we need to tell from where to get the values for these two and what to do with it. So far it is just a disclosure.

Line 2 & 3:
Dim dRange As Range
Dim dColor As Long

Two variables with the name dRange and dColor are defined. These two will be used to process the information given as part of function arguments mentioned inside parenthesis in line 1. I will explain it further in a bit.

Line 4:
dColor = color.Interior.ColorIndex

Remember dColor variable defined in line 2 and 3? and “color” variable mentioned in line 1?

Once user has mentioned the cell address for first argument “color” we want Excel to get the color index or simply the specific color number and store it as a value of variable dColor. Once stored we can use this color index number as a criteria.

Line 5 to 8:
For Each dRange In data_range
If dRange.Interior.ColorIndex = dColor Then
CountColor = CountColor + 1
End If

Remember we defined dRange as variable and has data_range as argument in line? In fifth line we asked Excel to take each cell in range (that user has mentioned for second argument as data_range) and equate it as dRange.

In sixth line we are invoking IF condition statement and we are checking if the color index number of any cell is equal to the color index number of dColor variable (remember we stored a specific color index number in line 4 above) then add “1” to the count. 

Terminate IF statement once all cells are checked going through each element in dRange.

This essentially creates a loop and check each cell mentioned in range and once all cells are checked loop is terminated.

In few words this code is fetching the color index number of cell mentioned by user and then comparing it against the color index numbers of each and every cell in the range specified. The ones that match are counted in and the ones that doesn’t match are ignored. That is how we get the count.

Sum cells based on color using VBA

Now that we understand how code works. We can modify it just a tad bit to have another function that sums the value of cells that fulfill criteria. Have a look at the following code that makes a new UDF that sum values based on cell color:

Function SumColor(color As Range, data_range As Range)
 Dim dRange As Range
 Dim dColor As Long
dColor = color.Interior.ColorIndex
For Each dRange In data_range
 If dRange.Interior.ColorIndex = dColor Then
 SumColor = SumColor + dRange.Value
 End If
Next dRange
End Function

It is exactly the same code as we had for count function with only difference. Instead of adding “1” for each cell matching the criteria, we want excel to take the value of that cell and add it up.

As simple as it can get!

Here is the illustration that shows count and sum of cell values based on color:

107 COMMENTS

  1. Mallorca is one of the most popular tourist destinations in the world and a great place to go to Dive Center Mallorca. Cave diving Mallorca is a type of diving that is done in caves or other underwater caverns. It is a very popular activity in Mallorca because there are many caves and caverns to explore. Cave diving can be a very dangerous activity if you are not properly trained. That is why it is important only to go cave diving with a qualified instructor. Petro Divers is one of the best Tauchschule Mallorca, and we can help you enjoy the best part of life. We offer the best cursos de buceo Mallorca. Visit the website to learn more about us and our services.

  2. Looking for the best web design company India? Look no further than Mega Web Design. They are a leading web design company offering their clients a wide range of website designing services India. With over many years of experience, they have designed and developed websites for some of the biggest brands in India. They believe in quality over quantity. Their team of experienced designers and developers will work closely with you to understand your requirements and deliver a high-quality website that meets your needs. If you are looking for a website designing company India that can provide you with a top-notch website, then contact them today. They would be happy to discuss your requirements and provide you with a proposal.

  3. In this rapidly moving world, the quality of your graphic design can make or break your business. Matebiz Pvt. Ltd. understands the importance of high-quality visuals that accurately represent your brand and engage your audience. That’s why they offer the most attractive and professional graphic design services India. Their skilled designers will work closely with you to understand your needs and create visuals that perfectly capture your brand identity. They use the latest design software and technologies to create stunning designs that will grab attention and make a lasting impression. So if you’re looking for a graphic design company India that will take your business to the next level, look no further than Matebiz. They’re also the leading provider of logo design services India, ready to help you boost your brand’s visibility and reach your marketing goals.

  4. Looking to get the most Cash For Cars Brisbane QLD? CarsWreckers is the best place to sell your car for top dollar. We provide a cash-for-car service that is quick, easy, and hassle-free. We’ll even come to you to pick up your car, so you don’t have to worry about anything. Not only do we offer the most cash for cars in Brisbane, but we also offer the service of Used Auto Parts Brisbane. If you’re looking for a specific part for your car, we can help you find it. We have a large inventory of parts that are sure to meet your needs. CarsWreckers is the best place to sell your car and get the most cash for it. We are the best Brisbane Car Wreckers. Contact us today to get started.

  5. We all know how good yoga is for our health and well-being. But did you know that yoga can also be a powerful tool for personal transformation? If you want to deepen your practice and connect with yourself on a higher level, consider joining a yoga retreat. At Bhakti Yogshala, we offer 7 day yoga retreat in Rishikesh, India. We provide the best Yoga teacher training Rishikesh. Our Yoga teacher training India is open to all levels of students, from beginners to advanced practitioners. During your stay, you will have the opportunity to practice a variety of yoga styles, including Hatha, Ashtanga, and Kundalini. You will also be able to participate in other activities, such as meditation, pranayama, and chanting. If you want to join one of our yoga courses, please visit our website.

  6. Scubanautic is a leading scuba diving service provider that provides scuba divers with an experience they will never forget at Tauchbasis Mallorca. Scubanautic’s Tauchschule Mallorca
    is the ideal location for novice divers looking to get their feet wet and experienced divers interested in expanding their horizons since it is in the middle of the Mediterranean. The waters of Mallorca, known for their exceptional clarity, are home to a diverse population of marine life, making it an excellent location for scuba divers. The knowledgeable instructors at Scubanautic are committed to giving you a safe and pleasurable diving experience that will leave you with memories that will be with you for the rest of your life. Scubanautic invites you to visit the fantastic world of Tauchen Mallorca today to learn more about it.

  7. CarsWreckers can assist you if you are seeking a hassle-free solution to sell your old car in the West Auckland area and are considering doing so. Since we provide cash for cars in West Auckland, you can sell your vehicle to us and get paid for it without going through the hassle of a private sale or a trade-in. You may obtain a price in a matter of minutes using our straightforward online form, and we will collect your vehicle at no cost. Contact CarsWreckers right now to sell your vehicle for cash and prevent your old vehicle from collecting dust and taking up space.

  8. In Kingston, the services of van wrecker and auto wrecker are provided by JCP Car Parts. These services are dependable and efficient. Their team of experienced professionals can assist you in various situations, including dealing with a vehicle breakdown and the need to dispose of an old or damaged vehicle. JCP Car Parts employs equipment and methods that are up to date to guarantee that your car is handled effectively and safely. The company places a strong emphasis on the happiness of its customers. You can rely on JCP Car Parts for all of your van and truck wreckers qld and the locations around them.

  9. Welcome to HpCarRemovals Ipswich, one of the leading car wreckers and cash for cars scrap companies in Ipswich. We offer a wide range of services including car wrecking, cash for car scrap, and car removal. We have been in business for many years and have a team of highly experienced and qualified professionals. We are dedicated to providing the best possible service to our customers and strive to exceed their expectations. If you are looking for car wreckers Ipswich or cash for cars scrap, then we are the right choice for you. We offer competitive rates and a hassle-free service. We also offer a free quote so that you can get an idea of what we can do for you. Contact us today to learn more about our services!

  10. Are you interested in expanding your digital marketing reach by contributing to a guest blogging site? SeoServiceIndia provides a venue for guest blogging on subjects relating to digital marketing. You can gain valuable exposure for your brand by contributing a Digital Marketing Guest Post to our website, which will also assist you in connecting with a vast audience. Your material may be published on our website in no time if you take advantage of our intuitive interface and expedited review procedure. Don’t lose out on the chance to display your industry knowledge and acquire crucial site backlinks.

  11. CarRemovals is a car removals and salvage company that serves Auckland and surrounding areas. We are a family-owned and operated business with many years of experience in the industry. We offer a wide range of services, including car removals Auckland, auto wrecking, and salvage. We also offer a cash for cars. We accept all makes and models of cars, trucks, and vans, regardless of condition. We are committed to providing the highest level of customer service and satisfaction. We offer free quotes and free pick-up. We also offer a 100% satisfaction guarantee. Contact us today to learn more about our services!

  12. At EfjConsulting, we pride ourselves on being the leading accountants in Welling. We offer a wide range of services, including VAT Returns in UK. We are committed to providing our clients with the best possible service and advice. Whether you are a small business or a large corporation, we can help you with all your accounting needs. We have a team of experienced and qualified accountants who are ready to help you with any query you may have. Contact us today to find out more about our services and how we can help you!

  13. Looking to get rid of an old car? CashForScrapCars offers cash for cars Auckland wide! We take away any make or model of car, in any condition – running or not. We also offer cash for cars, so you can get rid of that old junker taking up space on your property. We offer a hassle-free service and can usually have your car removed within 24 hours and provide the best cash in hand. Contact us today to get a free quote!

  14. Telangana is a state in southern India with a rich history and culture, as well as a variety of natural and man-made attractions. Some of the popular tourist places in telangana include

  15. Hello There. I found your blog using google. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful information. Thanks for the post.

  16. Celebrate birthdays in style! Our special range of birthday cards are the perfect way to show your loved ones just how much you care, adding an extra touch of love to their special day.

  17. We are a virtual staffing service company that helps thousands of businesses across the world in building, growing, and transforming their online presence. Since 2014, we have made our mark in helping firms cut their operating costs by as much as 75% through outsourcing. Hire our best dedicated virtual employee.

  18. really your blog is to,much better I am impressed by the details that you have on this website and posts like this. thanks

  19. I am very glad to read the post, it is very well written. You have done hard work in writing this post and I am impressed with your work.

  20. When it comes to planning a bachelor party, choosing the Best Bachelor Party Destinations is one of the most important decisions you’ll make. The destination sets the tone for the entire event and can make or break the experience. But with so many options available, it can be challenging to know where to start.

  21. 4 Cons Of Working Part-Time Jobs As A Student Abroad Study

    Students who want to be responsible and make their own money depend on part-time job to be more secure. If students take abroad study consultancy and study abroad  then they have to pay for their expenses and are in a need of passive income, which is why they go for part-time jobs.

  22. Trapstar Hoodie is Official Trapstar UK Store. Our Trapstar Hoodies UK Offering Latest Trapstar® Collection.

  23. The digital age has made education so that classrooms cannot exist in isolation. As a research strategy, it falls short of being comprehensive. students need to comply because students feel obligated to. Homework must be completed within the specified time limit. Everything is really serious, and no reasonable person would expect this to be a simple process. The completed homework must be handed in by the deadline. Someone should take charge and organize a schedule for all the workouts. There’s a great way out of here. If you assume you’ll have a free weekend to complete everything, you’re deluding yourself. If you set any ambitious targets, you can bet on failing to meet them. To accomplish anything, you’ll need a healthy dose of physical toughness. The online format of these courses is proving challenging for some students. Both inside and outside the office, it takes a lot of time. For these reasons, many students have expressed interest in searching how much should I pay someone to take my online class while they focus on their other online coursework.

  24. thanku for giving me best information . you want to take help for the technology then you can visit my site.

  25. Are you getting excited yet? Hence, by installing the HBO Watch Party Extension for free, you may create or join an HBO Party from multiple places. Watch your favorite shows with as many people as you want at the same time.

  26. Teleparty is a free extension designed to let the users enjoy their favourite TV shows, movies, web series, and much more. It supports all the major streaming sites that allow you to choose your own.

  27. A popular podcast and music streaming service is Spotify. You can access it using a web browser on your PC, tablet, iPhone, or Android device. However, by using this extension, you won’t be required to download the app on different devices. Moreover, it offers simple keyboard shortcuts, thus, giving a better user experience. On your desktop web browser, you may utilize the Spotify Web Player Extension to listen to any song that is available in millions. Additionally, the extension is accessible to download from Google Chrome and Microsoft Edge browsers.

  28. During streaming movies or videos, the playback speed is always crucial. Whether it is too fast up or slow, everyone requires a comfortable and more pleasing video speed. Therefore, using the Video Speed Controller Extension will effectively assist in determining the online video playback speed per your liking.

  29. Your information is so much best for all gys thanku for giving me your best information.
    you want to learn best knowledge for technology you can visit my site.

  30. Visit our DIGI MANTHAN centre if you’re looking for the best laptop repairing course in delhi. This course’s education is carefully delivered by DIGI. The DIGI’trainer provides teaching for all academic levels. If you want to learn more about management system topics, register in this course. Our goal is to support in your career development. The best trainers in the sector are now available in Delhi. Our institute offers excellent direction in this area.

  31. The WPS Pin HP Printer is a code that is used to connect the printer to a wireless network. This code is typically located on the printer itself and can be used to connect the printer to a router or other wireless device. In order to use a WPS pin, you will need to have an active Internet connection and a printer that supports this type of connection. Once you have these two things, you can connect your printer to the network.

  32. Loved how conveniently you listed down everything about baby showers. Share some cutest wishes via baby shower card and make the parents-to-be super surprised and happy.

  33. Hey there, I am Devid Martin . Many times the user faces in QuickBooks won’t open. If you need help getting your books back up and running smoothly, we’re here to help with. Let us help you today with fast, reliable support!

  34. Thanks for Sharing this post,Hey there, I am david. The QuickBooks Install Diagnostic Tool is a quick remedy for discovering and repairing QuickBooks errors during any installation. If QuickBooks detects a mistake, this diagnostic tool is always accessible to assist. QuickBooks Desktop has a number of features that rely on basic Microsoft components. QuickBooks will face troubles if any of these components stop working for whatever reason. In addition to the QuickBooks error, this diagnostic tool checks for problems with the .NET Framework, C++, and MSXML.

  35. Chiastolite jewelry is a beautiful and powerful way to tap into the energy of these unique cross-stone crystals. Also known as “fairy crosses,” chiastolite crystals are believed to hold spiritual significance and protective properties. These crystals are often used in meditation and energy healing practices, as they are said to help ground and balance the body’s energy. When crafted into jewelry, chiastolite stones can be worn close to the skin, allowing their energy to be absorbed and enhancing their healing benefits. With their distinctive cross-shaped pattern, chiastolite jewelry is not only spiritually meaningful, but also a visually stunning addition to any jewelry collection.

  36. Very nice information related to this Blog. This Information is very good and helpful, Thank you to provide us.

  37. It’s fantastic that you are getting ideas from this post as well as from our argument made at this time.

  38. I am not good at Exel and this tips are really so helpful.

  39. I was browsing for a new jacket on several websites for the forthcoming winter. I looked at various websites but couldn’t settle on one. After a few visits, I found Buffalo Bills Blue Satin Bomber Jacket on Jacket-Hub. I really loved this jacket on these websites, and it’s not enough that we can purchase it in three different styles at the greatest price.

  40. Rapid Assignment Help offers online assignment writing services in UK at affordable prices. Secure top grades with the help of our professional experts. Our assignment help services offers you with quality content and 100% plagiarism free assignments. Browse our more sites like Assignment Help Edinburgh and Assignment Help Nottingham.

  41. This is very good idea and I took help many time from your site and I would like to learn proper formula in excel.

    Thank you so much!

  42. Find Out A Relevant Info On How Can I Use A Fake Name On Cash App
    Are you one of those users who are using a fake name on their Cash App accounts? All you have to do is to have a word with the troubleshooting experts on how Can I Use A Fake Name On Cash App. After clarify your doubts, you should proper utilize the real name of your Cash App account with optimum ease.

  43. Wanna know how to increase cash app withdrawal limit?
    Trying to Increase the Cash App Withdrawal Limit but could not do due to lack of knowledge of the procedure to increase the limit. If you want to increase the cash app withdrawal limit of your account then you have come in the right direction to know about the method to inverse the withdrawal limit of the cash app. to get the way to increase the withdrawal limit you just have to click on this link.

  44. Career Developer is MBBS admisson consultant in patna.Career Developer brings for you the best collages option in India as well as in abroad like Russia, China, Philippine, Ukraine, Belarus, Kyrgyzstan, Nepal, Bangladesh and many more, we are here to give you best carrier option in your respective field, as the Career Developer is the most distinguished leading educational organization.

  45. Our coursework help USA experts have attained a lucid style of writing. They can compile essays in any style of writing if aspirants specify their requirements. Our professionals are highly adaptable. They have a significant eye for writing essays or assignments.

  46. Lodha Group is a real estate company known for its expertise in ensuring best quality and mastery over the design area. Codename Best Deal Wadala project, where life is evergreen is a New Lunch project from the house of Lodha Group properties. Lodha Group properties brings you a new world of live comfortable location of Wadala in Mumbai, where lifestyle at its best phase! Codename Best Deal Wadala offers competitively priced apartments to those looking for a stylish and classy lifestyle. Codename Best Deal Wadala gives high on connectivity and convenience as well and the finest standalone tower. Codename Best Deal Wadala is Conveniently connected by Eastern Free way , Monorail and upcoming Wadala-Thane Metro. Near Codename Best Deal Wadala positioned in close proximity to major IT campuses, your work place could be just a stone’s throw away. Codename Best Deal Wadala is offers to a very good qualities and futures in whole life. such as to its a very good news because Wadala is situated to in heart of Mumbai, where we know about in a good natural thing. Codename Best Deal Wadala is going to offer 2 BHK, 2 BHK Luxury, 3 BHK Luxury spacious apartments integrated with the number of world class amenities that gives the best living structure for the lifestyle with EOI Benefit upto 15 Lacs.

  47. Dotom domain Govandi is project by Dotom realty in Govandi, Mumbai. Dotom domain Govandi offer 1,2 BHK apartments at reasonable price rate. Dotom domain Govandi comes with best class internal and external amenities and with near by places.

  48. Thank you! This is a simple solution that I have been trying to find the answer to for hours! This simple VBA worked great, no knowledge needed!

  49. At VIGNAN IAS, we take immense pride in introducing ourselves as one of the Best IAS Coaching Center in Bangalore for IAS coaching with maximum success ratio

  50. Great work Hassan & i also want learn MS Excel really appreciate. really happy to found pakistani web. Good luck man i am also from pakistan.

  51. Your post is very unique and reliable information for all readers to write more on the same topic and share with us your info…Thanks,    

  52. quite an impressive site you have here. as an excel expert i must admit that your knowledge is challenging to me. Thanks

  53. Your post is very unique and reliable information for all readers to write more on the same topic and share with us your info…Thanks,

  54. thanks so much for this wonderful piece of information I really love your website and all it web blogs and post I’m going to recommend your website to others it really informative and has good content. GOOD JOB ..

  55. Thanks for giving such information. I will be very help full to play with excel.

  56. Thank you very much:-) you helped us a lot:)

  57. thank you very much the information was very much useful and this issue was very much complicated for me and these formulas ease and solve my problems

  58. Thank you for sharing! It really helps!

  59. My issues are resolved on how to count sum cells based on cell colour excel

  60. Hi Hasaan,

    Thanks for your function very easy to use
    My only question is auto updating the user defined formula

    I find the count or sum works all ok but when I change a cell colour in the range the formula will not uodate unless I click into the formula cell and force a recalculation

    Is there something I’m missing?

  61. I’m very concerns because when I close the file then I reopen it was error. Could you tell me why

  62. I greatly appreciate your blog posts! As a Budget Analyst I am constantly exploring ways to automate and streamline my Excel tasks. You have been a great help to that end. Thank you so much!

  63. I have followed this step by step but for some reason it is not calculating

    Values just keep coming up with 0 or #NAME?

    Please advise

  64. Thanks for the sharing such very informative content regarding summing up cells in Excel based on cell background color. I am happy I found this blog!

  65. much obliged to you for the blog. it was incredible help.

    if it’s not too much trouble allude to this site for additional data

  66. Wow.. very very useful post. Keep more like this. Thank you for the wonderful sharing.

  67. Oureducation Coaching Institute our students in safe social and physical environment and provide freedom to go beyond the IAS syllabus that transforms the young mind into future leader.

  68. KEI Hifi store is best online shop in india.you can get Hegel Music Systems, Power Amplifier, Hegel Electronics High End Audio Music System in reasonable prices

  69. This is a great information.Keep blogging this type of post.This type of information is very useful

  70. Ace Pneumatic is a manufacturer of pneumatic chisel, pneumatic cylinder manufacturers, steel rod manufacturers with simple motto of customer satisfaction & quality product.

  71. In the event that you are confronting issue while surfing the web on your program, you can dial our Google Chrome Support +1-855-746-8414.

    It has untold quality and now it is available in the much better brand.Call our Firefox Technical Support +1-855-746-8414 for any brand.

    At the Internet Explorer Technical Support, the specialized arrangement is constantly both subjective and effective by means of the various method for specialized help on Internet Explorer Support Number +1-855-746-8414.

    Most common problem users are facing with Opera Browser are to set up or install Opera Browser. To resolve these problems you need Opera troubleshooting help. Dial the Opera Support Number +1-855-746-8414 anytime.

    On the off chance, if you face technical Issue when using your Safari browser or you are not able to assume the direction of using the browser, do not get tensed. This is because we are there to help you come out of such condition with our absolute Safari Customer Service +1-855-746-8414 Toll-Free.

  72. thank you for the blog. it was great help.
    please refer to this website for further information

  73. Great Information For everyone. Because today’s time everyone is using Microsoft excel. Keep Sharing.

  74. Barry HAW WC ESS MEL AD WB FRE R GEE 6
    Bev HAW GW ESS MEL AD WB FRE R GEE 5
    Dawn HAW GW ESS MEL AD WB FRE R GEE 5
    Dean HAW GW CA GC AD WB FRE NM COL 3
    Grant HAW GW ESS MEL AD WB FRE R COL 4
    Steve HAW WC ESS MEL AD WB FRE R GEE #NAME?

    WIN LOST
    I want to count the number of squares that are correct for each person. In excel i have colored them green.
    I would like the score to automatically increase each time i color another entry with a green background. how can i improve what i have so far.?

  75. Interesting idea, though it doesn’t seem to work on conditional formatting, which for me, does not make it that useful. If it could be made to work to detect the color of cells using conditional formatting it would be great to use with pivot tables.

    • Hmmm really interesting. I will have to give it a try and see what works. Seems Interior property needs additional details to get it to work with conditional formatting. Probably “displayformat”. I will update the post once I have the solution for conditional formatting.

      See this is how feedback works 🙂 Thanks for letting us know. I am on it!

      • Hi Hasaan,

        Did you resolve this issue with conditional formatted colored cells?
        Your macro returns 0 on conditional formatted cells.

LEAVE A REPLY

Please enter your comment!
Please enter your name here