View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Total a Variable

Another interpretation:

For i = 21 To 279
ActiveCell.Offset(0, 0).Value = "Result"
ActiveCell.Offset(0, 1).Value = i
ActiveCell.Offset(0, 2).Value = nType(i)
ActiveCell.Offset(1, 0).Select
Next i
set rng = ActiveCell.Offset(0,2)
rng.formulaR1C1 = "=Sum(R[-259]C:R[-1]C)"
rng.Formula = rng.Value

--
Regards,
Tom Ogilvy


"Paul Black" wrote in message
...
Hi,

This Snippet of Code Works Perfect and Outputs the Results to a
Worksheet :-

For i = 21 To 279
ActiveCell.Offset(0, 0).Value = "Result"
ActiveCell.Offset(0, 1).Value = i
ActiveCell.Offset(0, 2).Value = nType(i)
ActiveCell.Offset(1, 0).Select
Next i

My Question is, How can I Modify the Above Code so that it Produces the
Total of the Values of nType(i) at the Bottom Please.

Thanks in Advance.

All the Best.
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!