Sum the first 10 numbers in a 26 cell range
Forgot they were text
try:
Function addtext(myrange, howmany)
For Each r In myrange
If r < "" Then
counter = counter + 1
total = total + Val(r)
addtext = total
If counter = 10 Then Exit Function
Else
End If
Next
End Function
Don
"Don" wrote in message
...
jester,
=SUM(OFFSET($A$2,0,0,SMALL(IF(ISBLANK(A2:A27),"",R OW(A2:A27)),G1)-1,1))
(G1 is = 10)
enter as array formula
"jester" wrote in message
om...
I have to sum the first 10 numbers in a 26 cell range. The problem is
that I do not know which cells the numbers are in. The 26 cells
contain single quotes (') to begin with. The numbers are typed in as
the event occurs. I do not know which cells they will be typed in. I
only want the first 10 numbers to be sumed. This can be a formula or a
macro. The formula is preferred. Thanks in advance.
|