View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Sum calculation based on condition

Is there a reason the built in function SUMIF will not work? Look in the NON
vba help index.

--
Don Guillett
SalesAid Software

"mniccole" wrote in message
ups.com...
HI:
I need to be able to loop though column a & if a condition is true, I
need to caculate a sum in based on the value in column m..
I need to be able to display the count of the active cell & the sum of
column m &
loop though..I have numerous values I have to set this for...


I'm trying this & it's not working..
Any help would be greatly appreciated...



If ActiveCell.Value = "SPECIALTY CARE" Then
SpecCount = x + 1
' sum = Range("M2:M2", Range("M2").End(xlDown)).Calculate
sum = Range("M2:M2000").Formula = "=sum(M2:M2)"

I think I've confused myself....
THANK YOU