View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Sum new Column Added

try
Sub insertcolumnsandsum()
ac = ActiveCell.Column
ar = 1
With Cells(ar, ac)
.Resize(, 2).EntireColumn.Insert
.Offset(27, 0).Formula = _
"=sum(r1c" & ac + 2 & ":r27c" & ac + 2 & " )"
End With
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jul in Ohio" wrote in message
...
I have Excell XP 2002, I have a macro that inserts two columns one is a
date
field and one is a number field.

After inserting the number column I would like to have a macro to place a
sum formula in row 27 of the column. Any ideals.

I have tried a couple others that have been offered, and nothing seems to
be
working.