View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Delete Row 22 in all Sheets

try something like this:

Sub test()
Dim sh As Worksheet

For Each sh In Worksheets
sh.Rows(25).Delete
sh.Range("A57:G57").Formula = "=SUM(A45:A55)"
Next sh

End Sub

--
Hope that helps.

Vergel Adriano


"Sean" wrote:

How would I delete Row 25 in all sheets of my workbook. I've 54 sheets
so would prefer to do via code rather than manually.

Also how would I add the simple formula =sum(A45:A55) to Columns A-G
(in cell 57) on each sheet also?

Thanks