Thread: SUMIF question
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default SUMIF question

This may? help.
A macro I did recently for a similar problem. Adapt to suit

Sub averagearray()
For Each c In Array(1, 2, 3, 10, 23, 34)
If Cells(c, "a") 4.5 Then
ms = ms + Cells(c, "a")
cc = cc + 1
End If
Next c
MsgBox ms
MsgBox cc
MsgBox ms / cc
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Billy B" wrote in message
...
I am trying to calculate a percent based on the SUMIF function using
non-continuous cells. Row 5 of the worksheet contains the possible points
and
row 7 the points the student has received. Have been working at it a while
and having problems getting it to work. Below is what I have so far. Any
help would be appreciate

=IF(SUM(F7:AS7,AW7:CG7,CK7:EE7,EJ7:EX7,FB7:FS7,FW7 :GW7,HB7)=0,0,SUMIF({"F7:AS7"AW7:CG7","CK7:EE7","E J7:EX7","FB7:FS7","FW7:GW7","HB7"},"=0",{"F7:AS7" ,"AW7:CG7","CK7:EE7","EJ7:EX7","FB7:FS7","FW7:GW7" ,"HB7"}/{"$F$5:$AS$5","$AW$5:$CG$5","$CK$5:EE$5","EJ$5:EX$ 5","FB$5:FS$5","FW$5:GW$5","HB$5"}))