I have a bunch of expense categories and am using the macro to check if the categories are in a certain range. If they are not in the range, I need to insert a row copying the formulas from the above row and add the category. The code I am using is:
RepeatCheck = IsNumeric(Application.Match(TempCategory, Range("Management:GenAdmin"), 0))
If RepeatCheck = False Then
ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormulas
ActiveCell.EntireRow.Copy
ActiveCell.Offset(1).EntireRow.PasteSpecial xlPasteFormulas
Application.CutCopyMode = False
ActiveCell.Offset(0, 1).Value = Isblank
ActiveCell.Offset(0, 2).Value = TempCategory
Else
End If
The code works but it is slow. I have a lot of expense categories to cycle through so getting this as streamlined as possible is important.
Thanks for your help
RepeatCheck = IsNumeric(Application.Match(TempCategory, Range("Management:GenAdmin"), 0))
If RepeatCheck = False Then
ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormulas
ActiveCell.EntireRow.Copy
ActiveCell.Offset(1).EntireRow.PasteSpecial xlPasteFormulas
Application.CutCopyMode = False
ActiveCell.Offset(0, 1).Value = Isblank
ActiveCell.Offset(0, 2).Value = TempCategory
Else
End If
The code works but it is slow. I have a lot of expense categories to cycle through so getting this as streamlined as possible is important.
Thanks for your help