View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_707_] Simon Lloyd[_707_] is offline
external usenet poster
 
Posts: 1
Default Add a value to itself


Hi, I recorded this, i put values in cells A1:A10 and values in B1:B10
then highlighted cells C1:C10 then clicked on the sum icon and below is
the code it produced......it should get you somewhere near to want you
are trying to do.

regards,

Simon
Sub count()
Range("C1:C10").Select
Selection.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=525672