Thread: SUMIF in VBA
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James C. James C. is offline
external usenet poster
 
Posts: 32
Default SUMIF in VBA

Hi,

I am trying to code a SUMIF expression in VBA. I keep getting an error and
was hoping someone could assist.

Here is the formula (not in VBA Code):
=sumif('Annual Data'!Q:Q,"CLT",'Annual Data'!M:M)

I tried this (VBA):
SumIf(Sheets("Annual Data").Range(Q, Q), "CLT", Sheets("Annual
Data").Range(M, M))

Any help would be appreciated.