It depends upon exactly what you want to select.
Here are a few examples that select cells in columns A & B.
On a blank sheet, enter something in cells A2,B6, & C10 then run each of the macros to see what they do.
Sub SelectColumns1()
Dim col As Range
Set col = Cells(Rows.Count, "A").End(xlUp)
Range("A1", col).Resize(, 2).Select
End Sub
Sub SelectColumns2()
Range(Range("A1"), Intersect(Range("A:B"), ActiveSheet.UsedRange)).Select
End Sub
Sub SelectColumns3()
Intersect(Range("A:B"), ActiveSheet.UsedRange).Select
End Sub
Sub SelectColumns4()
Dim LastCell As Range
Set LastCell = Range("A:B").Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows)
Range(Range("A1"), LastCell).Select
End Sub
Sub SelectColumns5()
Dim col1 As Range, col2 As Range
Set col1 = Cells(Rows.Count, "A").End(xlUp)
Set col2 = Cells(Rows.Count, "B").End(xlUp)
Union(Range("A1", col1), Range("B1", col2)).Select
End Sub
Thanks a lot GUTHRUM and thanks for the different options