View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to Put Conditional Sums in macros

Range("A1").FormulaArray = "=Sum(if((B1:B200=5)*(C1:C2006),1,0))"

--
Regards,
Tom Ogilvy


"Alan P" wrote in message
...
I am trying to use a macro to ad a conditional sum and am unable to do it

or
decipher the VBA (alleged) help section. Usingthe wizard while in the

macro
didn't work and I can't figure out a syntax that works. Can anyone point

me
inthe right direction?

Thanks,

Alan