Okay, I think I'm going crazy: I'm working on a macro, and at the outset I determine my last row, use it, then do an Advanced filter to copy unique values. I then want to refigure my last row to be the bottom of the unique list, but my "Lastrow" code throws up an error, "Method "Range of Object Global" failed". I can't figure out why. Any help would be greatly appreciated.
Sub Macro2()

Dim LastRow As Long


LastRow = Range("A" & Rows.Count).End(xlUp).Row

    Columns("A:A").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("A:A").NumberFormat = "General"
    Columns("AI:AJ").NumberFormat = "General"
    
    Range("A1").FormulaR1C1 = "Concat"
    Range("A2:A" & LastRow).FormulaR1C1 = "=RC[7]&""-""&RC[3]"
    
    
    Columns("A:A").Select
    Range("A1:A" & LastRow).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("AH1"), Unique:=True
    
    ActiveSheet.UsedRange
    
    LastRow = Range("AH1" & Rows.Count).End(xlUp).Row