Hi all,
I've created a macro in my excel sheet that will copy down all of the formulas when I insert a row. I'm using the following code to do this:
Sub InsertRowFormulas ()
Selection.EntireRow.Insert
For Each cell In Intersect (ActiveSheet.UsedRange, Selection.Offset (-1, 0). EntireRow)
If cell.Has Formula Then
cell.Copy cell.Offset (1,0)
End If
Next
End Sub
However, there are some columns with an "H" in them which denotes a holiday. I would like for my macro to copy down these H's as well when inserting a new row. Any advice or help on how to do this would be greatly appreciated.
Thanks!
I've created a macro in my excel sheet that will copy down all of the formulas when I insert a row. I'm using the following code to do this:
Sub InsertRowFormulas ()
Selection.EntireRow.Insert
For Each cell In Intersect (ActiveSheet.UsedRange, Selection.Offset (-1, 0). EntireRow)
If cell.Has Formula Then
cell.Copy cell.Offset (1,0)
End If
Next
End Sub
However, there are some columns with an "H" in them which denotes a holiday. I would like for my macro to copy down these H's as well when inserting a new row. Any advice or help on how to do this would be greatly appreciated.
Thanks!