Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wildwoody
 
Posts: n/a
Default Will excel add cells using colour coding eg Add all red cells

I have colour coded a spreadsheet and would like to set a cell to recognise
the couloured cells and add all these cells to a total
  #2   Report Post  
cparaske
 
Posts: n/a
Default Will excel add cells using colour coding eg Add all red cells


Not sure if you can actually add colored cells.

What is the content inside the cell? If there is a pattern, you can
try a few things to get a sum.


--
cparaske
------------------------------------------------------------------------
cparaske's Profile: http://www.excelforum.com/member.php...fo&userid=3793
View this thread: http://www.excelforum.com/showthread...hreadid=477902

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default Will excel add cells using colour coding eg Add all red cells

Nothing built in

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

will do it


--

Regards,

Peo Sjoblom



"Wildwoody" wrote in message
...
I have colour coded a spreadsheet and would like to set a cell to

recognise
the couloured cells and add all these cells to a total



  #4   Report Post  
L. Howard Kittle
 
Posts: n/a
Default Will excel add cells using colour coding eg Add all red cells

Peo recommends Chip Pearson's site to get this done, and of course he is a
pro.
Here is an armature shot at it that sums the values in the orange, red and
green cell. Will not work if the color is a result of conditional
formatting. Not sure if Chip's will overcome the conditional formatting,
been awhile since I looked at it.

Where Data is a named range on the worksheet.

Sub SumColorCount()
Dim Orange46 As Integer, _
Red3 As Integer, _
Green4 As Integer
Dim Cell As Range

For Each Cell In Range("Data")
If Cell.Interior.ColorIndex = 46 Then
Orange46 = Orange46 + Cell.Value
ElseIf Cell.Interior.ColorIndex = 3 Then
Red3 = Red3 + Cell.Value
ElseIf Cell.Interior.ColorIndex = 4 Then
Green4 = Green4 + Cell.Value
End If
Next

Range("F10").Value = "Orange = " & Orange46
Range("F11").Value = "Red = " & Red3
Range("F12").Value = "Green = " & Green4

MsgBox " You have: " & vbCr _
& vbCr & " Orange " & Orange46 _
& vbCr & " Red " & Red3 _
& vbCr & " Green " & Green4, _
vbOKOnly, "CountColor"

Range("F10").Value = ""
Range("F11").Value = ""
Range("F12").Value = ""
End Sub

HTH
Regards,
Howard

"Wildwoody" wrote in message
...
I have colour coded a spreadsheet and would like to set a cell to recognise
the couloured cells and add all these cells to a total



  #5   Report Post  
Chip Pearson
 
Posts: n/a
Default Will excel add cells using colour coding eg Add all red cells

Not sure if Chip's will overcome the conditional formatting,
been awhile since I looked at it.


The code on my colors page does not take into account colors of
Conditional Formatting, only normal formats.


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




"L. Howard Kittle" wrote in message
. ..
Peo recommends Chip Pearson's site to get this done, and of
course he is a pro.
Here is an armature shot at it that sums the values in the
orange, red and green cell. Will not work if the color is a
result of conditional formatting. Not sure if Chip's will
overcome the conditional formatting, been awhile since I looked
at it.

Where Data is a named range on the worksheet.

Sub SumColorCount()
Dim Orange46 As Integer, _
Red3 As Integer, _
Green4 As Integer
Dim Cell As Range

For Each Cell In Range("Data")
If Cell.Interior.ColorIndex = 46 Then
Orange46 = Orange46 + Cell.Value
ElseIf Cell.Interior.ColorIndex = 3 Then
Red3 = Red3 + Cell.Value
ElseIf Cell.Interior.ColorIndex = 4 Then
Green4 = Green4 + Cell.Value
End If
Next

Range("F10").Value = "Orange = " & Orange46
Range("F11").Value = "Red = " & Red3
Range("F12").Value = "Green = " & Green4

MsgBox " You have: " & vbCr _
& vbCr & " Orange " & Orange46 _
& vbCr & " Red " & Red3 _
& vbCr & " Green " & Green4, _
vbOKOnly, "CountColor"

Range("F10").Value = ""
Range("F11").Value = ""
Range("F12").Value = ""
End Sub

HTH
Regards,
Howard

"Wildwoody" wrote in
message
...
I have colour coded a spreadsheet and would like to set a cell
to recognise
the couloured cells and add all these cells to a total





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to partially lock the cells in Excel? Locking cels in Excel Excel Discussion (Misc queries) 1 September 19th 05 02:21 PM
Color coding cells in Excel jdiedrick Excel Discussion (Misc queries) 3 September 12th 05 11:39 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
I'm loosing colour when copying charts from excel to word. Ched76 Charts and Charting in Excel 1 June 8th 05 03:12 AM
EXCEL, VSTO: Fastest way to access multiple cells Alan Excel Discussion (Misc queries) 1 June 1st 05 02:45 PM


All times are GMT +1. The time now is 04:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"