View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Referring to a column

Use these two snippets in your code. The dim statement comes after Sub.
The for...next statement goes wherever necessary. Modify
range("G2:G100") as necessary.

dim c as range

for each c in range("G2:G1000").cells
c.formular1c1="=SUM(RC[-2]:RC[-1])"
next c

HTH
Kostis Vezerides