I am trying to make a selection of an entire column except the first row. I used the following code which i got from https://www.extendoffice.com/documents/excel/1628-excel-select-column-except-header-first-row.html
Sub SelectColumn()
Dim xColIndex As Integer
Dim xRowIndex As Integer
xColIndex = Application.ActiveCell.Column
xRowIndex = Application.ActiveSheet.Cells(Rows.Count, xColIndex).End(xlUp).Row
Range(Cells(2, xColIndex), Cells(xRowIndex, xColIndex)).Select
End Sub
but the RowIndex variable reads to the value 1. So the section happens from Row2 to Row1 instead of Row2 to the Last row. How can i get this corrected