0

In Google Sheets, if I select a cell and then SHIFT+Space I expect the entire row row to be selected however sometimes only part of the row is selected and I need to press SHIFT+Space again.

For example:

  1. I select a cell: I select a cell
     

  2. I press Shift+Space but only part of the row is selected: I press SHIFT SPACE
     

  3. I press Shift+Space again (or just Space if I haven't yet released Shift) to select the remainder of the row: I press SPACE a second time


I found a LinkedIn post where Ben Collins says the following:

Here's the shortcut to select a whole row in Google Sheets:

Shift+Space Bar

Note: if you use this when your cursor is inside or next to a filled data range, it will only highlight the row within that range. Press it again to extend to the whole row.

Despite his 'note', I see different behavior since my first selection finishes with two blank cells and I'm confused as to whether internal ranges are forcing the selection to end where it does and I need to remove them.

Is there a way to select the entire row the first time?

0

2 Answers 2

1

TL;DR

  1. 'Select row' shortcut's functionality isn't properly described in the documentation.
  2. 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.
  3. 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'

Image Description

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:

  1. It doesn't adjoin any populated cells.
  2. 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:

  1. Your initial selection E12 has an adjoining range A2:Z21 * see note
  2. 'Select row' expands E12 to A12:Z12 which includes all the columns from its adjoining range.
  3. 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.
     
    Animation showing 'Select row' expanding selection from E12 to A12:Z12
     
    * 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.

Example Spreadsheet

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.

sample selection

  1. Referencing the table above, if a selection is made that includes at least a highlighted cell or a value:
    1. 'Select row'
      Will expand the selection to include columns C to M
    2. 'Select column'
      Will expand the selection to include rows 3 to 13
    3. '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

11
  • Hmm... Control + Space selects columns while the question is about rows. When you want to select an island or the entire sheet, it is usually easier to use Control + A instead of the Control + Shift + Space combo. Commented Jun 21 at 8:36
  • @doubleunary I edited my answer to better explain what I meant. I understand why Google doesn't invest adequately in documentation if they can get away with it; it's a lot of work. Documenting the shortcuts as 'Select column', 'Select row', and 'Select all' is misleading at best. I wonder if the functionality evolved at some point.
    – Blindspots
    Commented Jun 22 at 1:29
  • 1
    I think these keyboard shortcuts have worked the same way for the past ten years at least. Commented Jun 23 at 7:29
  • @doubleunary Ty. It is incredible the amount of undocumented info carried around by experts like you. I came late to the Google ecosystem. I seem to remember you using undocumented functions in an answer I read. I find it crazy what I go through to have clarity on things like this. For example Gmail search.
    – Blindspots
    Commented Jun 23 at 18:04
  • 1
    Saw your edits. Great treatment. Added a link from my answer to yours. Commented Jun 24 at 6:16
1

To always select an entire row, click the row number with the mouse.

The Shift + Space key will select the current cell, and, in the event the cells to the left or right in the adjoining range are not blank, also selects those cells, continuing until a blank cell or sheet side is met, in both directions. If the cells immediately to the left and right in the adjoining range are blank, the whole row gets selected. It does not matter whether the current cell is blank or not.

When you press Shift + Space a second time, the whole row is selected, unless the whole row was already selected.

Google Sheets has no features to customize or modify these keyboard shortcuts.

See the keyboard shortcuts help page and Blindspot's explanation of the adjoining range.

(repost of this answer)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.