sumifs - Sum IF VBA error '438' - object doesn't support this property or method -


i dont know why gives me '438' - object doesn't support property or method error, in "sumif" function line.

how can sumif function in vba?

application.worksheetfunction.sumifs(range("n2:n" & rsum), range("c" & rw), range("s2:s" & rsum)) 

and here's whole code:

 sub macro1()     dim lr integer     dim rw integer     dim rsum integer      lr = range("c" & rows.count).end(xlup).row     rsum = range("n" & rows.count).end(xlup).row         rw = 2 lr              if not isempty(range("c" & rw).value)              range("g" & rw).value = application.worksheetfunction.sumifs(range("n2:n" & rsum), range("c" & rw), range("s2:s" & rsum))              end if              if range("g" & rw).value = 0                 range("g" & rw).value = "-"                 range("f" & rw).value = "no"             elseif range("g" & rw).value <> 0                 range("f" & rw).value = "yes"              end if         next rw     end sub 

excel version 2002.

maybe second , third parameters switched ?

2nd parameter sould range criteria_range1 , , 3rd parameter should criteria1.

try:

 range("g" & rw).value = application.worksheetfunction.sumifs(range("n2:n" & rsum), range("s2:s" & rsum), range("c" & rw)) 

Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -