LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Conditional Formatted numbers add based on color?

I'm wondering how to Add red numbers together in a column and blue numbers in
a column. I've conditionally formatted them based on a text string (CAD/USD)
but the macro I've found isn't working, I believe it's not working because
the cells are conditionally formatted.

Not my code, forget were I got it from.

Function SumColor(rColor As Range, rSumRange As Range)

Dim rCell As Range
Dim iCol As Integer
Dim vResult

iCol = rColor.Interior.ColorIndex

For Each rCell In rSumRange
If rCell.Interior.ColorIndex = iCol Then
vResult = WorksheetFunction.Sum(rCell) + vResult
End If
Next rCell

SumColor = vResult
End Function


 
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
add value of cells based on the formatted fill color mike Excel Worksheet Functions 3 November 5th 09 07:41 PM
Conditional format a cell based on color of another Marlo Excel Discussion (Misc queries) 3 January 21st 08 01:50 AM
sum by conditional formatted color Dave F Excel Discussion (Misc queries) 2 March 14th 07 05:35 PM
calculate numbers based on font color? Costa Excel Worksheet Functions 1 September 5th 05 03:59 PM
Conditional Formatted Cell Color Index MDR5300 Excel Programming 5 January 27th 05 09:15 PM


All times are GMT +1. The time now is 11:10 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"