I'm using this code, but columns with last row (A,B,K,L) fill in with 0 beyond the defined last row. Additionally, my transaction and type occasionally stop working, but if anyone sees what i'm doing wrong i'd love to learn so i don't have this issue again.
 Sub test()
Dim lastRow As Long
    
    lastRow = Cells(Rows.Count, 10).End(xlUp).Row
    'delete blank columns
    Range("W:W,U:U,S:S,Q:Q,O:O,M:M,K:K,I:I,G:G,E:E,C:C,A:A").Select
    Range("A1").Activate
    Selection.Delete Shift:=xlToLeft
      'filter for blanks
    Range("A:L").CurrentRegion.Select
    Selection.AutoFilter
    ActiveSheet.Range("$A$1:$L$1").AutoFilter Field:=10, Criteria1:="="
    ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp)
      Selection.AutoFilter
 'Trans
    Columns("A:A").Select
       Selection.NumberFormat = "General"
       Range("A2:A" & lastRow).SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
       Columns("A:A").Select
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
  'Type 
 Columns("B:B").Select
       Selection.NumberFormat = "General"
     Range("B2:B" & lastRow).SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
        Columns("B:B").Select
       Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False 
   'Debit
   Range("K2:K" & lastRow).Select
     'Range(Selection, Selection.End(xlDown)).Select
        Selection.Replace What:="", Replacement:="0", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
           ReplaceFormat:=False
    'credit
       Range("L2:L" & lastRow).Select
        'Range(Selection, Selection.End(xlDown)).Select
        Selection.Replace What:="", Replacement:="0", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
               
End Sub
 
     
    