#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default sumIf


In any case, in this piece what is it doing? Is it offset from "C" 1
column? So the sum
function is reading the C range one cell at a time and if there is a value
in the next column it sums it? Please let me know if I am correct.
TIA,

set streams_needed = Intersect(range("H12:h64000"), ActiveSheet.UsedRange)


For each C in Streams_needed
DCT= Application.worksheetfunction.sumif(streams_needed .offset(0,1),
c.offset(0,1) value, streams_needed)

If c.formula like "=sumif*" then
if C.Value 40 then
c.font.bold = true
c.font.colorindex = 3

end if
end if
Next C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default sumIf

That's what it looks like to me.

But unless you're doing something special, this line:

If c.formula like "=sumif*" then
will most likely fail

I'd check to see if that cell contains a formula (not text) and then make sure I
used the right case for =SUMIF(.



Janis wrote:

In any case, in this piece what is it doing? Is it offset from "C" 1
column? So the sum
function is reading the C range one cell at a time and if there is a value
in the next column it sums it? Please let me know if I am correct.
TIA,

set streams_needed = Intersect(range("H12:h64000"), ActiveSheet.UsedRange)

For each C in Streams_needed
DCT= Application.worksheetfunction.sumif(streams_needed .offset(0,1),
c.offset(0,1) value, streams_needed)

If c.formula like "=sumif*" then
if C.Value 40 then
c.font.bold = true
c.font.colorindex = 3

end if
end if
Next C


--

Dave Peterson
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
IF and SUMIF JBoyer Excel Worksheet Functions 9 July 2nd 08 11:52 PM
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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