''' If Error GoTo NextCode
On Error GoTo NextCode
''' Select column A until the last column
Columns("A:A").Select
Range(Selection, Selection.End(xlToRight)).Select
''' Select cells with error
Selection.SpecialCells(xlCellTypeConstants, 16).Select
''' Select columns for cells with error and delete the columns
Selection.EntireColumn.Delete
NextCode:
NextCode Here..
MS Excel Tutorials
Guidelines to Excel VBA, Macro, Formula and Functions for Beginners
Stop searching. Start learning and developing your excel skills.
Select Columns Contain Error
February 06, 2024 |
Labels:
Selection
Select from Cell A1 until the Last Cell
February 06, 2024 |
Labels:
Selection
Dim rLastColumnLetter As String
Dim rLastRowNumber As Long
rLastColumnLetter = Split(Columns(Range("A1").End(xlToRight).Column).Address(, False), ":")(1)
rLastRowNumber = Range("D" & Rows.Count).End(xlUp).Row
Select from cell A1 until the last cell.
Range("A1:" & rLastColumnLetter & rLastRowNumber)
Subscribe to:
Posts (Atom)
!doctype>