Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If someone can help me please?
At the moment I am using 'Sheets("Mine").Activate' to insert a row on a specified sheet, but now I would like to insert the row using the code below on multiple sheets e.g (1st to last sheet) without having to name each sheet. Can this be done? 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Columns in multiple sheets | Excel Worksheet Functions | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How do you insert rows into multiple sheets in a workbook? | Excel Discussion (Misc queries) | |||
insert Rows with Formulas in Place on Multiple Sheets? | Excel Discussion (Misc queries) | |||
Insert same picture in multiple sheets and only change once | Excel Discussion (Misc queries) |