Hi all,
I have got a macro that inserts a new row in each and every sheet within a workbook using the following:-
Can someone help with inserting a formula in each and every sheet in H2 where the formula is =AVERAGE(H2:Last Row)
Where last row is the last row that has data. Please note some sheets may not have any data after row 3.
Additionally, having inserted row 2 in each sheet, I note that cells are formatted with the colour and fill colour from the previous row. Is there any way that the fill colour is set to “No Fill” and the colour is set to black?
Can what I am asking for be coded with the loop I have?
Thanks in advance for any assistance.
I have got a macro that inserts a new row in each and every sheet within a workbook using the following:-
VBA Code:
For Each ws In Worksheets
With ws
.Rows(2).Insert Shift:=xlDown
Rows("2:2").Select
End With
Next
Can someone help with inserting a formula in each and every sheet in H2 where the formula is =AVERAGE(H2:Last Row)
Where last row is the last row that has data. Please note some sheets may not have any data after row 3.
Additionally, having inserted row 2 in each sheet, I note that cells are formatted with the colour and fill colour from the previous row. Is there any way that the fill colour is set to “No Fill” and the colour is set to black?
Can what I am asking for be coded with the loop I have?
Thanks in advance for any assistance.