Trying to create myself a cheat sheet to remember syntax for selecting rows. Can someone help fill in my last blank please for selecting non-adjacent rows with a minimum code language?
I'm thinking I have to establish the range of the data on the sheet first, identify the rows containing this word, and then the syntax might need to use a form of 'UNION' to select those rows, but I don't have a clear understanding of it.
7. Selecting multiple rows.
I'm thinking I have to establish the range of the data on the sheet first, identify the rows containing this word, and then the syntax might need to use a form of 'UNION' to select those rows, but I don't have a clear understanding of it.
7. Selecting multiple rows.
syntax | Rows("18:27").Select | This code selects multiple adjacent rows, row 18 through 27 being the specific rows and all the way to the far, right end of the spreadsheet including all blank cells in all the columns in that row. |
Range("2:2,4:4,6:6,7:7").Select | This code selects multiple non-adjacent rows, and all the way to the far, right end of the spreadsheet including all blank cells in all the columns in that row. | |
Range("BW8:BW12").Select Range(Selection, Cells(ActiveCell.Row, 1)).Select | This code selects multiple adjacent rows, just to the last column with data on the spreadsheet and includes all blank cells in all the columns in that row. (The specific last column of data is known and the specific rows that contain the data is known) | |
This code selects multiple non-adjacent rows, just to the last column with data on the spreadsheet and includes all blank cells in all the columns in that row. (The specific column and row that contains the data are known, such as selecting just to the end of the data for all non-adjacent rows that contains the word CANCELED in column H) |