Excel VBA - select a dynamic cell range
问题 I want to be able to dynamically select a range of cells (the heading row), where the row is 1 but the columns with be for 1 to last column, where "A" is the first Column and where "M" is the last column. I know how to find the last column, but I don't know how to modified the below range to input the first and last column as "A" and "M". Range("A1:M1").Select 回答1: If you want to select a variable range containing all headers cells: Dim sht as WorkSheet Set sht = This Workbook.Sheets("Data")