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: 1
Default Help with my code and formula

Here is the formula and it is not doing what I want and also is the cod
for the "CellCol" in my formula.

=sumcellcol($I$11:$I$22,B11:B22)

What I need is for my formula to look at column "I" if the cell i
filled with color fill #43 then on the same row sum the amount i
column "B".

I also need to have the code checked.


Function SumCellCol(rng As Range, rng2 As Range) As Double
Dim Sumcell As Range
Dim dSum As Double
Application.Volatile True
dSum = 0
For Each Sumcell In rng2
If Sumcell.Interior.ColorIndex = 43 Then
dSum = dSum + Sumcell.Offset(0, -1).Value
End If
Next
SumCellCol = dSum
End Function


Appreciate all assisstance,
Y

--
Message posted from http://www.ExcelForum.com

 
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
formula code nobbyknownowt Excel Discussion (Misc queries) 5 August 10th 06 05:40 PM
Have a Formula I want to put in to some Code Q John Excel Programming 2 June 5th 04 04:39 PM
Not sure if I need a formula or some code.... Candee[_19_] Excel Programming 5 April 16th 04 04:50 PM
formula to code help JohnE Excel Programming 2 February 28th 04 01:27 AM
Help with code or formula Gareth[_3_] Excel Programming 8 October 18th 03 12:43 AM


All times are GMT +1. The time now is 05:20 PM.

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

About Us

"It's about Microsoft Excel"