Bottom line: Learn some of my favorite keyboard shortcuts when working with rows and columns in Excel.
Skill level: Easy
Whether you are creating a simple list of names or building a complex financial model, you probably make a lot of changes to the rows and columns in the spreadsheet. Tasks like adding/deleting rows, adjusting column widths, and creating outline groups are very common when working with the grid.
This post contains some of my favorite shortcuts that will save you time every day.
I've also listed the equivalent shortcuts for the Mac version of Excel where available.
#1 – Select Entire Row or Column
Shift+Space is the keyboard shortcut to select an entire row.
Ctrl+Space is the keyboard shortcut to select an entire column.
Mac Shortcuts: Same as above
The keyboard shortcuts by themselves don't do much. However, they are the starting point for performing a lot of other actions where you first need to select the entire row or column. This includes tasks like deleting rows, grouping columns, etc.
These shortcuts also work for selecting the entire row or column inside an Excel Table.
When you press the Shift+Space shortcut the first time it will select the entire row within the Table. Press Shift+Space a second time and it will select the entire row in the worksheet.
The same works for columns. Ctrl+Space will select the column of data in the Table. Pressing the keyboard shortcut a second time will include the column header of the Table in the selection. Pressing Ctrl+Space a third time will select the entire column in the worksheet.
You can select multiple rows or columns by holding Shift and pressing the Arrow Keys multiple times.
#2 – Insert or Delete Rows or Columns
There are a few ways to quickly delete rows and columns in Excel.
If you have the rows or columns selected, then the following keyboard shortcuts will quickly add or delete all selected rows or columns.
Ctrl++ (plus character) is the keyboard shortcut to insert rows or columns. If you are using a laptop keyboard you can press Ctrl+Shift+= (equal sign).
Mac Shortcut: Cmd++ or Cmd+Shift+
Ctrl+- (minus character) is the keyboard shortcut to delete rows or columns.
Mac Shortcut: Cmd+-
So for the above shortcuts to work you will first need to select the entire row or column, which can be done with the Shift+Space or Ctrl+Space shortcuts explained in #1.
If you do not have the entire row or column selected then you will be presented with the Insert or Delete Menus after pressing Ctrl++ or Ctrl+-.
You can then press the up or down arrow keys to make your selection from the menu and hit Enter. For me it is easier to first select the entire row or column, then press Ctrl++ or Ctrl+-.
So, the entire keyboard shortcut to delete a column would be Ctrl+Space, Ctrl+-. You could also use the keyboard shortcut Alt+H+D+C to delete columns and Alt+H+D+R to delete rows. There are lots of ways to do a simple task… 🙂
#3 – AutoFit Column Width
There are also a lot of different ways to AutoFit column widths. AutoFit means that the width of the column will be adjusted to fit the contents of the cell.
You can use the mouse and double-click when you hover the cursor between columns when you see the resize column cursor.
The problem with this is that you might just want to resize the column for the date in cell A4, instead of the big long title in cell A1. To accomplish this you can use the AutoFit Column Width button. It is located on the Home tab of the Ribbon in the Format menu.
The AutoFit Column Width button bases the width of the column on the cells you have selected. In the image above I have cell A4 selected. So the column width will be adjusted to fit the contents of A4, as shown in the results below.
Alt,H,O,I is the keyboard shortcut for the AutoFit Column Width button. This is one I use a lot to get my reports looking shiny. 🙂
Alt,H,O,A is the keyboard shortcut to AutoFit Row Height. It doesn't work exactly the same as column width, and will only adjust the row height to the tallest cell in the entire row.
Mac Shortcuts: None that I know of. The Mac version does not use the Alt key sequence which I believe is a limitation of the Mac OS.
#3.5 – Manually Adjust Row or Column Width
The column width or row height windows can be opened with keyboard shortcuts as well.
Alt,O,R,E is the keyboard shortcut to open the Row Height window.
Alt,O,C,W is the keyboard shortcut to open the Column Width window.
The row height or column width will be applied to the rows or columns of all the cells that are currently selected.
These are old shortcuts from Excel 2003, but they still work in the modern versions of Excel.
Mac Shortcuts: None that I know of. The Mac version does not use the Alt key sequence which I believe is a limitation of the Mac OS.
#4 – Hide or Unhide Rows or Columns
There are several dedicated keyboard shortcuts to hide and unhide rows and columns.
- Ctrl+9 to Hide Rows
- Ctrl+0 (zero) to Hide Columns
- Ctrl+Shift+( to Unhide Rows
- Ctrl+Shift+) to Unhide Columns – If this doesn't work for you try Alt,O,C,U (old Excel 2003 shortcut that still works). You can also modify a Windows setting to prevent the conflict with this shortcut. See the comment from Pablo Baez on Oct 5, 2015 below for further instructions. Thanks Pablo! 🙂
Mac Shortcuts: Same as above
The buttons are also located on the Format menu on the Home tab of the Ribbon. You can hover over any of the items in the menu and the keyboard shortcut will display in the screentip (see screenshot below).
The trick with getting these shortcuts to work is to have the proper cells selected first.
To hide rows or columns you just need to select cells in the rows or columns you want to hide, then press the Ctrl+9 or Ctrl+Shift+( shortcut.
To unhide rows or columns you first need to select the cells that surround the rows or columns you want to unhide. In the screenshot below I want to unhide rows 3 & 4. I first select cell B2:B5, cells that surround or cover the hidden rows, then press Ctrl+Shift+( to unhide the rows.
The same technique works to unhide columns.
#5 – Group or Ungroup Rows or Columns
Row and Column groupings are a great way to quickly hide and unhide columns and rows.
Shift+Alt+Right Arrow is the shortcut to group rows or columns.
Mac Shortcut: Cmd+Shift+K
Shift+Alt+Left Arrow is the shortcut to ungroup.
Mac Shortcut: Cmd+Shift+J
Again, the trick here is to select the entire rows or columns you want to group/ungroup first. Otherwise you will be presented with the Group or Ungroup menu.
Alt,A,U,C is the keyboard shortcut to remove all the row and columns groups on the sheet. This is the same as pressing the Clear Outline button on the Ungroup menu of the Data tab on the Ribbon.
*Bonus funny: At some point when using the group/ungroup shortcuts, you will accidentally press Ctrl+Alt+Right Arrow. This is a Windows shortcut that orientates the entire screen to the right. I call it “neck ache view”. To get it back to normal press Ctrl+Alt+Up Arrow.
If your co-worker or boss accidentally leaves their computer unlocked and you want to play a joke on them, press Ctrl+Alt+Down Arrow. This will turn their screen upside down. Don't forget to record a video of their WTF reaction… 🙂
What Are Your Favorites?
There are a ton of keyboard shortcuts for working with rows and columns. The above are some of my favorites that I use everyday. What are some of your favorites? Please leave a comment below. Thanks! 🙂
Hi Jon,
Is there an Excel shortcut for the vlookup function?
I’ve searched online and cant find anything and then remember you’ve answered a question of mine before, in the above thread.
Thanks
Peter
Thanks Dear for such a informative knowledge.
I usually use short keys to insert or delete row and columns. But i found you by searching how to hide rows and columns with short keys.
Thanks for your sharing.
Sir Jon Acampora,
Thanks for your sharing.
Hi,
kindly share the excel short keys in my mail ID
hi<
how can i switch two raw (places) by using excel short cut with out using cut and paste.
thanks
Thanks Jon, most useful. The Ctrl+9 & 0 don’t appear to work in Excel 365, however Ctrl+O, etc works fine.
Nice and useful tips John, Thanks…I too love keyboard shortcuts.
Hi Steve,
Below are the steps for higher versions of Windows or Excel set up issues for the same with little changes mentioned already by Pablo for older versions.
1. Click Start, and then click Control Panel.
2. Double-click Language.
3. Click Advanced Settings
4. Click Change language bar hot keys under Switching input methods
5. Click Advanced Key Settings tab, and select Between input languages.
6. Click Change Key Sequence…
7. For Switch Keyboard Layout, select Not Assigned.
8.Click OK to close each dialog box.
I hope this will solve your issue.
Thanks
Velks
Thanks Velks
please share vlookup function in my email., i dont know anything else
Great….. The shortcuts are worth remembering.
Thanks. Really useful.
Hi Jon,
Thanks Dear,
I am always using shortcut key when working in the excell work book, so this shortcut key are very useful for me.
There are some fascinating points in time on this article however I don’t know if I see all of them heart to heart. There is some validity however I’ll take hold opinion till I look into it further. Good article , thanks and we wish more! Added to FeedBurner as nicely
comprar reproducciones
Tienes cuenta de youtube?
Is there a shortcut to hide the rows after using Shift-Alt-Right arrow to group them?
Hi,
What is the shortcut for hiding and unhiding the columns and raws in windows 10.
thanks in advance.
Madey..
THANKS
what is short key to auto adjust the column width as per data entry in the column. ALT+H+O+I works only to auto fit the length as per colume name size, but it doesn’t fit as per entire column width. i know there is short key to manually change the length as per desire, but i want short key to auto adjust the column width as per data entered in column.
Thanks for you kind support
Siddiq
Its Alt+O C A
What is the shortcut key to hide and unhide columns in MS Excel 2007?
Control+9
Control+0
awsome shortcuts thanx
Control+9
Control+0
not working in 2013 version?
THANKS JOHN AND COMMENTS- SOLUTION PROVIDED GUYS
Hi Jon, hi all
I tend to work more with text than numbers (I’m a translator). I often get glossaries from customers in Excel format and need to set row height to AutoFit. This is because they or I sometimes have to merge cells. This seems to torpedo the Cells->Format->AutoFit row height function. Is there a quick and dirty way to do this?
If you use this function frequently, you may pin it to the Quick Access Toolbar: File > Options > Quick Access Toolbar (or Alt+F+T+Q). Choose from left column and move it to the right, then arrange the order. For my convenience, I would put my most frequently used command as the second in the list, so that I can press Alt+2 at ease.
This was really lovely. Learnt many new things. Came here looking for a keyboard shortcut for show/un-showing the Grouped rows/column. Clicking that + / – button. Does anyone know if that is possible?
Alt + :
Select Visible Cells only. Then copy / paste as needed. Or Format only visible cells.
Very useful when working with SUBTOTALS. I often want to format/highlight/bold only the subtotals and not the details.
Nice
Í enjoyed very much the lesson, God bless you and continue to educate us It Will be better if you will be sending me lessons through my e-mail
Hi,
I use multiple shortcuts and have no particular favorite until now.
Now I gone use both Ctrl+Alt+Right Arrow, Ctrl+Alt+Left Arrow, Ctrl+Alt+Down Arrow. When doing my web presentation on bad graphs.
Then I will know if they are looking on my presentation or doing something else… If they claim its upside down I will tell them its there own settings on there computer which are wrong !!!
Ha, Ha.
Thanks for this.
Regards.
Johan.
(Ctrl+Alt+Up Arrow to reset.)
Hi John,
Here are some additional keyboard shortcuts related to Rows and Columns (either in a range or in a table)
1. Shift+Home – When selecting a cell in the middle of the row – extends selection to the beginning of the row
2. End+Shift+Enter – Extends selection to the last non-empty cell in
the row (Press End+Shift, release the End Key while still pressing Shift and press Enter)
3. Ctrl+End – Moves to the last cell (bottom right)
4. Ctrl+Shift+T – Displays/removes table’s total row (toggle)
5. Ctrl+Shift+Arrow Key – Extends selection from the active cell
(left, right, up, down) to the beginning or end of the row/column
BTW, if trick no.2 does work on your computer, then I’m probably the only person in the universe who knows this trick
All the above mentioned shortcuts have been tested on Excel 2013 Professional Plus; however there’s no guarantee that they’ll function as described on other versions.
P.S.
I’m not a great fan of the Alt keyboard shortcuts because they work only on the English version of Excel.
Many thanks. I’ve been looking for these shortcuts, and now my works gona run a little more.
Gr8, what short cut we should use to have column and row highlighted this same time?
Really, helpful. As learning excel this is working like a friend.Thanks a ton.
Wow, thank you so much! Really appreciate it
Thanks a lot
That is really help full for me in my working day’s keep going on that good work Jon.
I found this very confusing as control+9 or control shift did not hide rows or columns but as the screen shot indicated control+0 did. Please adjust.
I wanted to add 0 all through the column at the front,
the Grouping tool is very very useful,
actually its all good, Thank you
CTRL+SPACE doesn’t work in non-English Windows with input method enabled. Because some input method will use CTRL+SPACE for other use. Even you disable that use, the CTRL+SPACE still doesn’t work in EXCEL.
Tq ur lessons, easily understood
Ok