View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Ray Bill Ray is offline
external usenet poster
 
Posts: 1
Default Sum Cells or Range and Insert Value into Cell

I am attempting to sum a range (Range_i) and then insert the values
into a cell. I am receiving the Type Mismatch error. Any help would be
appreciated.

Bill

==============================

Sub Macro1()

ActiveSheet.Cells(66, 15) = SumArray(Range_i)
'Cells above is Cells(Row number, Column number)

End Sub

Function SumArray(List)
SumArray = 0
For Each Item In List
If Application.IsNumber(Item) Then _
SumArray = SumArray + Item
Next Item
End Function