LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Marco formatting

I set up the following Marco:

Sub InsertFiveRows()
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Cells(LastRow, "A").EntireRow.Insert
Range("AU1:BF5").Copy Cells(LastRow, "A")
End Sub

I also want it to adjust some of the cells that were shifted down five cells
to accomadate the new cells into the formula. These are the ones that need to
be adjusted:

Cell B47 currently has the formula =COUNTA(B2:B46)
Cell C47 currently has the formula
=IF(SUMIF(E2:E46,"0",C2:C46)0,SUMIF(E2:E46,"0", C2:C46),"")
Cell D47 currently has the formula =IF(C47<"",E47/C47,"")
Cell E47 currently has the formula =IF(SUM(E2:E46)0,SUM(E2:E46),"")

All of these cells need to accomadate 5 newly added rows. Hope you can help!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Marco JBoyer Excel Programming 3 July 8th 08 10:49 PM
Marco Puzzled Excel Discussion (Misc queries) 3 July 30th 07 05:09 PM
Marco Help LaDdIe Excel Programming 2 July 16th 07 09:44 PM
Help with marco Gary Keramidas Excel Programming 1 December 2nd 06 05:17 AM
formatting cells script/marco Jan Agermose Excel Programming 1 September 18th 03 03:25 AM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"