I need help with this problem:
If any cell in column A is empty then in Columns D and E delete cells in the same row but shift up only cells in Columns D and E, Column A will stay untouched...
Sub DeleteUP_D_and_E_IF_A_IsEmpty()
Dim LastRow As Long, x As Long
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For x = 2 To LastRow
If Cells(x , 1) = "" Then Range(Cells(x, "D"), Cells(x, "E")).Delete Shift:=xlUp
Next
End Sub
Chicken ? ;)i to x. This will work if you use i as the row reference for the cells (e.g. `Cells(i, 1)).
Sub Macro2() ' ' Macro2 Macro ' ' Application.WindowState = xlNormal ActiveCell.FormulaR1C1 = "a" Range("D1").Select Selection.Delete Shift:=xlUp Range("E1").Select Selection.Delete Shift:=xlUp End SubConvert it to suitable and proper VBA code.