TL;DR
- 'Select row' shortcut's functionality isn't properly described in the documentation.
- Only a selection that includes all the columns in the adjoining range or is surrounded by empty cells, will expand to include all the columns in the sheet.
- Example spreadsheet to play with
Google's documentation is "imprecise"
It's confusing for Google to list the shortcuts in their documentation as 'Select column', 'Select row', and 'Select all'
Depending on the initial selection, the 'Select row' may select multiple rows and 'Select column' multiple columns, but more importantly, the behavior of the shortcuts can be best described as "expanding a selection to include the columns and/or rows of its adjoining range", not selecting rows, and columns, and sheets.
How the Shortcuts Expand Selections
|
SHORTCUT |
EFFECT ON SELECTION |
1 |
Shift + Space |
Width expands to include additional columns from adjoining range, otherwise all columns in sheet |
2 |
Ctrl + Space |
Height expands to include additional rows from adjoining range, otherwise all rows in sheet |
3 |
Ctrl + A Ctrl + Shift + Space |
Height and width expand to include additional columns and rows from adjoining range, otherwise the entire sheet |
Defining 'Adjoining Range'
Further to @doubleunary's answer not only does Sheets look at the cells immediately to the left and right of your selection to see if they are populated, but it also checks the cells immediately above and below your selection. For any populated cells it finds, Sheets repeats the same check for any cells that are adjoining them.
The process continues in that way, expanding in any direction necessary until your selection's adjoining range has been identified, a range of cells surrounded by empty cells (or sheet edges); an "island" if you will.
It is the columns from this adjoining range that are added to your selection when you use Shift+Space to expand your selection.
When do the shortcuts work as documented?
A selection will expand to include the entire row, column, or sheet, if any of the following are true:
- It doesn't adjoin any populated cells.
- It already includes all the adjoining range's:
- Columns, in the case of 'Select row'
- Rows, in the case of 'Select column'
- Both Rows and Columns, in the case of 'Select all'
Only if one or both of the above conditions are met will the shortcuts behave in the way Google describes in Keyboard shortcuts for Google Sheets.
Your Question
The behavior you are describing can be explained as follows:
- Your initial selection
E12
has an adjoining range A2:Z21
* see note
- 'Select row' expands
E12
to A12:Z12
which includes all the columns from its adjoining range.
- The new selection
A12:Z12
is the full width of A1:Z21
which itself has no adjoining populated cells, therefore the second 'Select row' expands A12:Z12
to 12:12
which includes all the columns in the sheet.
* Note
A1:Z21
is arbitrarily used because your images lack column letters as well as rows 1-3, 5, 6, 10, 17+. Your last selected column (circled in your 2nd image) has been assigned Z in the examples.
The table below is also in the linked spreadsheet which can be edited anonymously and copied to your Drive.
In the table below, the range of adjoining populated cells (those containing "value") is surrounded by a solid green border.
- Referencing the table above, if a selection is made that includes at least a highlighted cell or a value:
- 'Select row'
Will expand the selection to include columns C to M
- 'Select column'
Will expand the selection to include rows 3 to 13
- 'Select all'
Will expand the selection to include C3:M13.
Troubleshooting
Adjoining range drives everything
The dimensions of a selection's adjoining range determine the dimensions of the expanded selection when applying any of the three keyboard shortcuts.
If the behavior of 'Select row'
or 'Select column' is not what you expect, it may be useful to test the original selection with 'Select all' to gain insight into the adjoining range and the rows and columns that are included in it.
See example spreadsheet