Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
Comment:
Hi, I need a help.
I hope my english is good enough, I don't know the exact english words used to describe Microsoft Excel features...
I'd like to know if there is a way to sum colored cells.
I mean: I have a coloumn of cells with different numbers, I want excel to sum only the numbers in the colored cells; is it possible?
Thank you if you can help!
+1 | ![]() |
You could go to the cell that you want the total to show in and type: = and then select the first cell you would like in the total. Then type + and select the next cell and so on untill all cells are selected that you would like in the total. Something like this: =A1+A4+A6 Although this may be a big task if you have a very large spreadsheet. Hope that helps.
+1 | ![]() |
I understand that it cannot be donw with a formula but it canbe done using VBA.
See http://www.cpearson.com/excel/colors.htm for some good information.
Your question is answered under "Summing The Values Of Cells With A Specific Color" and they have the code too.
If you need to know how to use that code then post back.
HTH
Bryan
+1 | ![]() |
unfortunately I don't know how to use VBA so I couldn't solve the problem, I tried writing down the function found in the web site in the VBA software of excel but afterwards I wasn't able to use it in excel worksheet.
Maybe it's too hard for a complete beginner of VBA like me!
If you can tell me step by step how to do it, I would be really grateful, otherwise no problem! Thank you anyway
+1 | ![]() |
Sorry I was not able to back to you sooner. Had too many house guests this week.
"I could do it by myself!!! :-)"
I hope you mean that you were able to figure out how to use the function described in the link.
Copy the text.
Go to Excel spreadsheet and hit Alt+F11.
Go to Insert, Module, Paste.
SaveFrom within Excel hit the Function button.
Select 'User defined' at the bottom of the left hand column and 'SumByColor' from the right.False = Background colors
True = Font colorsBryan
![]() |
Adobe Distiller DPI setti...
|
Outlook Macro Problem
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.