How do I combined these 2 codes into one VBA code?
The first code is a recorded macro
Sub Macro1()
'
' Macro1 Macro
'
'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("C:D").Select
Selection.Delete Shift:=xlToLeft
Columns("D:E").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Columns("A:A").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("B:B").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Application.CutCopyMode = False
Selection.FormulaR1C1 = "=R[-1]C"
Columns("B:B").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
The second code is
Sub deleteBlank()
Dim Lastrow As Integer
Lastrow = Range("B" & Rows.Count).End(xlUp).Row
Range("C2:BC" & Lastrow).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
Bookmarks