Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sheet Count & Insert NewRow
I would appreciate very much if someone could help with editing the code
below please? What I would like the code to do is to insert the NewRow starting at sheet 20 and continue on to last sheet in workbook Thank you in advance Sub NewRow() EndRow = Cells(Rows.Count, 1).End(xlUp).Row n = Cells(Rows.Count, "AF").End(xlUp).Row + 1 Cells(n, "AC").Value = "Total" Cells(n, "AF").Formula = "=sum(AF5:AF" & n - 1 & ")" Union(Cells(n, "AF"), Cells(n, "AC")).Font.Bold = True Union(Cells(n, "AF"), Cells(n, "AC")).Font.ColorIndex = 2 Union(Cells(n, "AF"), Cells(n, "AC")).Interior.ColorIndex = 32 Union(Cells(n, "AF"), Cells(n, "AC")).Borders.LineStyle = xlContinuous Union(Cells(n, "AF"), Cells(n, "AC")).Borders.ColorIndex = 2 Union(Cells(n, "AF"), Cells(n, "AC")).Borders.Weight = xlThin For i = n + 1 To 32 If Application.CountA(Rows(i)) = 0 Then Rows(i).Interior.ColorIndex = 2 End If Next i Range("A5").Select Rows("5:32").Select Selection.RowHeight = 12.75 Range("A5").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert sheet tab is not functioning and can't add new sheet | Excel Worksheet Functions | |||
how do i count and insert rows | Excel Discussion (Misc queries) | |||
Count rows and insert number to count them. | Excel Discussion (Misc queries) | |||
UDF is updateing cells on another sheet with count from current sheet. | Excel Discussion (Misc queries) | |||
insert query into excell sheet to update excell sheet and pivot table | Excel Discussion (Misc queries) |