Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Sum all Cells with Interior Color Index not equal to 0

I need to sum cells in Range("F5:F" & LastRow) that have a Interior Color
Index < 0. Is there an easy way to do this?

Thanks is Advance,
Ryan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Sum all Cells with Interior Color Index not equal to 0

One way:

First, 0 is not a valid value for Range.Interior.ColorIndex. I assume
you mean xlColorIndexNone instead.

For Each rCell In Range("F5:F" & LastRow)
With rCell
If IsNumeric(.Value) Then _
If .Interior.ColorIndex < xlColorIndexNone Then _
dResult = dResult + .Value
End With
Next rCell

In article ,
RyanH wrote:

I need to sum cells in Range("F5:F" & LastRow) that have a Interior Color
Index < 0. Is there an easy way to do this?

Thanks is Advance,
Ryan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Sum all Cells with Interior Color Index not equal to 0

I should have thought of that, thanks for the help!

Ryan

"JE McGimpsey" wrote:

One way:

First, 0 is not a valid value for Range.Interior.ColorIndex. I assume
you mean xlColorIndexNone instead.

For Each rCell In Range("F5:F" & LastRow)
With rCell
If IsNumeric(.Value) Then _
If .Interior.ColorIndex < xlColorIndexNone Then _
dResult = dResult + .Value
End With
Next rCell

In article ,
RyanH wrote:

I need to sum cells in Range("F5:F" & LastRow) that have a Interior Color
Index < 0. Is there an easy way to do this?

Thanks is Advance,
Ryan


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
Sort by Cells Interior Color Then by Date RyanH Excel Programming 3 January 19th 10 05:38 PM
How to change the default interior color palette index in Excel 2003 [email protected] Excel Programming 1 March 29th 07 03:04 AM
cells interior/color index tandavina[_7_] Excel Programming 4 February 12th 06 11:28 AM
Range based on interior color index? garle Excel Programming 4 January 25th 06 02:24 PM
Sum all cells with interior color... Ctech[_65_] Excel Programming 4 January 11th 06 07:46 PM


All times are GMT +1. The time now is 10:11 PM.

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"