ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding figures in excel if text is a certain colour (https://www.excelbanter.com/excel-programming/271599-adding-figures-excel-if-text-certain-colour.html)

vipa2000

Adding figures in excel if text is a certain colour
 
I have a spreadsheet with a lot of figures in it that
evolves on a monthly basis. When the figures are added
each month the figures are changed in colour from red to
blue to denote going from budget costs to actual costs. I
want excel to sum the figures based on colour. How can it
be done. I have looked at the IF statement, but not sure.
Thanks in advance Paul

Chip Pearson

Adding figures in excel if text is a certain colour
 
Paul,

You need to use some VBA code to do this. See
www.cpearson.com/excel/colors.htm for example code, specifically
SumByColor.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"vipa2000" wrote in message
...
I have a spreadsheet with a lot of figures in it that
evolves on a monthly basis. When the figures are added
each month the figures are changed in colour from red to
blue to denote going from budget costs to actual costs. I
want excel to sum the figures based on colour. How can it
be done. I have looked at the IF statement, but not sure.
Thanks in advance Paul




Paul Walker

Adding figures in excel if text is a certain colour
 
Managed to integrate and on initial input works fine, however the cell
does not update automatically as I update colours of the cells. What am
i doing wrong? thanks in advance Paul


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Dave Peterson[_3_]

Adding figures in excel if text is a certain colour
 
Absolutely nothing wrong. Read that big note at Chip's site once more.

http://www.cpearson.com/excel/colors.htm

It's right near the top.


Paul Walker wrote:

Managed to integrate and on initial input works fine, however the cell
does not update automatically as I update colours of the cells. What am
i doing wrong? thanks in advance Paul

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--

Dave Peterson


Paul Walker[_2_]

Adding figures in excel if text is a certain colour
 
Thanks chaps. ALT F9 to recalculate. No other way around this but it
works! Got too carried away in my excitement that I had an answer and
did not fully read to the end of the document :-)



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com