5 Keyboard Shortcuts for Rows and Columns in Excel - Excel Campus
100

5 Keyboard Shortcuts for Rows and Columns in Excel

Bottom line: Learn some of my favorite keyboard shortcuts when working with rows and columns in Excel.

Skill level: Easy

Keyboard Shortcuts for Rows and Columns in Excel

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.

#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.

Select Entire Row or Column in Excel Keyboard Shortcuts

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.

Keyboard Shortcut to Select Rows or Columns in 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.

Select Multiple Columns with Shift Plus Arrow Keys

#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).

Insert Entire Row in Excel

Ctrl+- (minus character) is the keyboard shortcut to delete rows or columns.

Delete Selected Column in Excel

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+-.

Insert or Delete Menu Appears When Entire Row or Column is Not Selected

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.

Double-Click Resize Column Cursor to Autofit Column

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.

AutoFit Column Width Button in Excel

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.

AutoFit Column Width Button Resizes Column Based on Selected Cell Contents

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.

#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.

Excel Keyboard Shortcuts for Row Height and Column Width

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.

#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! 🙂

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).

Keyboard Shortcuts to Hide and Unhide Rows and Columns in Excel

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.

Select Cells That Surround Hidden Rows or Columns Before Unhiding

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.

Shift+Alt+Left Arrow is the shortcut to ungroup.

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.

Keyboard Shortcut to Ungroup Rows or Columns in Excel

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! 🙂

Please share
Jon Acampora
 

Welcome to Excel Campus! I am excited you are here. My name is Jon and my goal is to help you learn Excel to save time with your job and advance in your career. I've been an avid Excel user and VBA developer for 10+ years. I am also a Microsoft MVP. I try to learn something new everyday, and want to share this knowledge with you to help you improve your skills. When I'm not looking at spreadsheets, I get outdoors and surf. :) more about me

Click Here to Leave a Comment Below 100 comments
d.i - September 5, 2017

I loved reading all the helpful hints. They were just great. I am still trying to find an easy way to hide thousands of rows all at once without holding down the Ctrl – scrolling to the bottom of the list and then selecting hide. I need to export 10000’s of rows of data multiple times and am very tired of scrolling through the long lists. I know about Ctrl+Arrow key to get to the bottom of the rows quickly but still can’t find a good way to select 1-3000 then only hide 2-2999. Any suggestions?

Reply
Supriya - August 23, 2017

Thankew so much for this short cut keys. Appreciate you 🙂

Reply
Kim - July 7, 2017

Is there a shortcut to perform the same action to a cell that I just did to a previous cell?

Like, to select another cell repeat a command without clicking, choosing dropdown or menu, etc.

Much smaller scale than a macro. I think Mac has a function key for it, but I’m looking for one for Windows 8.1.

Thanks!

Reply
    Jan Martens - September 3, 2017

    F4 repeats the last action.
    Doesn’t work for all commands

    Reply
Ram - June 16, 2017

Shortcut key for executing format painter.

Reply
    RSK - September 13, 2017

    First select the Cell, which format you want to copy, then press
    Alt+H+F+P

    Reply
rajeev - May 24, 2017

Can You tell me sir. what is the shortcut of row height.

Reply
AJAY NAVIK - April 26, 2017

HI DEAR JON, CAN YOU GUIDE ME WHAT IS SHORTCUT OF HIDE COLUM AND CELL.

Reply
venkat - April 21, 2017

sir,
can u please tell me
how to insert tables

Reply
jaya - April 17, 2017

I’m not able to un hide the columns with using of this short cut ctrl+shift+0

Reply
Dave - April 13, 2017

FYI I have submitted this question to one of the forums. No takers after 3 days.

Excel 2013 – Win10

Shortcut key Ctrl+Shift+# formats dates as d-mmm-yy
I want to change that combination to format as d/m/yyyy.

Can it be done?

Google is silent, MS is silent …

Reply
    Jon Acampora - April 18, 2017

    Hi Dave,
    I don’t believe there is any way to change those shortcut keys. You could write a macro and assign it to that shortcut key to apply the formatting. The disadvantage there is that you will not be able to undo the action. My Formatting Shortcuts Add-in also helps with this process, and allows you to retain the full undo history. I hope that helps.

    Reply
Adam - April 13, 2017

Hi Jon,

Really good guide, thanks. Do you know if there is a way to hide the coordinates that appear when you select rows and columns? They get in the way of column A if you are selecting multiple rows down. Similar thing with heights and widths appearing when you try to change manually.

Thanks

Reply
Ann - April 9, 2017

Is there a way to expand the first column (to the left of Column A)?

Thanks!

Reply
Karma - March 18, 2017

Hi, Can you please let me know what is shortcut key for making same format between cells

Reply
    Jon Acampora - March 20, 2017

    Hi Karma,

    I don’t believe there is a dedicated shortcut for this, but you can copy/paste formats (Ctrl+C, Alt,E,S,T). Or you can use the Format Painter (Alt,H,F,P).

    Reply
UK - March 2, 2017

This is one of the most well thought out guides I have seen with regard to Excel shortcuts. I consider myself an amatuer in Excel and I am pretty well versed with formulas and macros too. I recently started working and use excel on a daily basis, so I have been trying to minimise my mouse usage and this guide was the perfect way to start. A few other shortcuts i use are Ctrl+D and Alt+H+F+I+S for auto fill and series fill.

Reply
Indranil biswas - February 16, 2017

Hello sir,

How to hide Row/column?
Shortcut key.

Reply
    CHAITYANG - March 6, 2017

    Dear sir,

    pls tell me. how to hide row/column? shortcut key……..and how to insert sheet in excel file shortcut key…..

    Reply
      Jon Acampora - March 6, 2017

      I explain how to hide rows and columns in #4 above. The keyboard shortcut to add a new sheet is Shift+F11. I hope that helps. Thanks!

      Reply
Ayaz - February 6, 2017

how to only Zero hide formula

Reply
Swati - January 19, 2017

To adjust all columns width at once, select all the data in the worksheet using Ctrl + A and then type Alt + O + C + A to adjust all column widths.

Reply
SHAKIR - December 31, 2016

HI
HOW TO HIDE ROW AND COLUMN WITH KEYBOARD???

Reply
Ibrauheem - December 15, 2016

You, my friend, are FREAKIN’ AWESOME!

I love and appreciate the level of attention to detail in your work.

Keep it up!

Reply
Anatoli Dragan - November 26, 2016

How to jump from one row to another with short cut key?

Reply
    Jon Acampora - December 1, 2016

    I don’t believe there is a dedicated keyboard shortcut for that. You could press down arrow, then shift+space bar.

    Reply
Pete - November 9, 2016

Is there a shortcut for showing/hiding Grouped columns?

Reply
    Jon Acampora - November 21, 2016

    Hi Pete,
    Yes, the Show Detail and Hide Detail buttons on the Data tab can be used for this. The keyboard shortcut to hide the groups (hide detail) is Alt, A, H. The keyboard shortcut to show or expand the groups (show detail) is Alt, A, J.

    You must have a cell selected inside the row or column group for this to work. If the cell intersects both the row and column groupings and you only want to hide the column groups, then select the entire column first with Ctrl+Space. Or do the opposite if you only want to collapse the row groupings.

    I hope that helps. Thanks!

    Reply
Alex - October 27, 2016

Hi, I was wondering if there is a keyboard shortcut for ‘Autofill’. I often copy formulas down the column and do the click and drag or double click on the bottom RHS of the cell, but was wondering if there was a shortcut. Thanks.

Reply
    Jon Acampora - November 1, 2016

    Hi Alex,
    Great question! I don’t believe there is a direct keyboard shortcut that mimics the double left-click on the fill handle. That would be a nice feature though.

    Reply
    Utkarsh Singhal - February 6, 2017

    Select the cells and Ctrl+D. Similarly, Ctrl+R for row wise autofill

    Reply
jillian - September 17, 2016

Hi Jon!

Can you tell me how to lock in the first three columns of a spreadsheet so that they don’t hide when you hide the cells to the right of them? In other words, how to make the first three columns lock in and not disappear when you hide the rows in the right of them?

Reply
    Mohsen - May 10, 2017

    Dear Jillian

    You can select Cell D1 then use Freeze panes (in View Tab). Keyboard shortcut for it is Alt+W+F. Also for Unfreeze pane.

    Thanks

    Reply
Yudis - August 21, 2016

Thank you for sharing, really helpful Sir

Reply
kuldeep seth - July 28, 2016

Very useful info. Thanks a lot!

Reply
Naga Sekhar - July 15, 2016

very useful information. thanks for given valuable information.

Reply
daryl - June 20, 2016

Jon,is there a shortcut to control the volume of the PC speaker? Thx

Reply
nazeer - June 17, 2016

so informative mr acampora… keep posting and helping us…

Reply
Saba - June 8, 2016

Hi Jon,

Do we have a shortcut key for the menu we get when we right click on sheet tabs.?

Reply
Treq - June 1, 2016

Hi,
If you want to go to a desired column or row like to column p or to 25th row, what keyboard shtct can you use?

Reply
    Jon Acampora - June 2, 2016

    Hi Treg,
    You can use Ctrl+G to open the Go To menu, then type the cell address. To go to a column you would need to type a:a to select the entire column. To go to a row you would need to type 25:25. It’s not the most efficient way, but does get you there. I hope that helps.

    Thanks!

    Reply
T satyanarayana - May 31, 2016

Very nice

Reply
Ramu - May 17, 2016

Its Very useful to learn

Reply
Manibalan - May 15, 2016

Hi Jon,

could you please let me know the shortcut key to worksheet tab hide and unhide

Reply
    Jon Acampora - May 17, 2016

    Hi Manibalan,

    Great question!

    The keyboard shortcut to hide sheets is: Alt,O,H,H

    The keyboard shortcut to unhide sheets is: Alt,O,H,U

    Those are old Excel 2003 shortcuts, but they still work in the modern versions of Excel. Plus, they are faster than the new ribbon shortcuts to hide/unhide sheets. Alt,H,O,U,S to Hide a sheet. Alt,H,O,U,H to Unhide a sheet.

    Reply
ashinpannasiri - May 8, 2016

Using rows
My working by formula need numbers of rows problems to add data of dhamma . The following numbers are should have at a spreadsheet. This amounts have in the 23 kinds of dhamma . All these are need to write the 4 types.
So rows numbers of workbook must have (23) numbers. Can you do this.
pathana dhammanulome pacchavara hetumulakadi sabammulakam
Numbers of questions.
(1) 49
(2) 1127
(3) 24794
(4) 520674
(5) 10413480
(6) 197856120
(7) 3561410160
(8) 60543972720
(9) 968703563520
(10) 14530553452800
(11) 203427748339200
(12) 2644560728409600
(13) 31734728740915200
(14) 349082016150067200
(15) 3490820161500672000
(16) 31417381453506048000
(17) 251339051628048384000
(18) 1759373361396338688000
(19) 10556240168378032128000
(20) 52781200841890160640000
(21) 211124803367560642560000
(22) 633374410102681927680000
(23) 1266748820205363855360000

Reply
    Jon Acampora - May 9, 2016

    Hi Ashinpannasiri,
    Sorry I’m not sure I understand your question. You might be able to use data validation for this.

    Reply
nikhil - April 25, 2016

Nice and very helpful…really, Please post more so that learning dont stop…

Reply
Aman - April 14, 2016

VERY HELPFUL AND EASY SHORT CUT KEYS
FOR WORKING IN EXCEL…………

THANKS ……….

Reply
Arpana - March 18, 2016

Hi Jon,

could you please let me know the shortcut key to expand Pivot one cell in new sheet.

Reply
    Jon Acampora - March 18, 2016

    Hi Arpana,
    Are you referring to showing the details of the pivot cell? Creating a new sheet that shows the source data for that cell? This is usually accomplished by double-clicking the cell or right-clicking > Show Details.

    If your keyboard has a menu key, then Menu Key + E is the keyboard shortcut to show the details of a cell in the values area of a pivot table. Here is an article on keyboard shortcuts for the menu key.

    Reply
      Arpana - March 20, 2016

      Hi Jon,
      Yeah right! what you are saying but there is one more shortcut key which i want to know.

      Reply
Geoff - February 22, 2016

Is there a shortcut so that when you insert cells it always moves “Shifts cells down” instead of the four options, and also for when deleting cells it always “Shifts cells up”

Reply
    Jon Acampora - February 22, 2016

    Hi Geoff,

    I don’t believe there is a direct shortcut, but the Insert/Delete Cells menu should default to those options. That means you can just press Enter when the menu appears. So, Ctrl+”+”, Enter would be the shortcut to shift cells down.

    If you want to shift the entire row down, or insert a new row, then you have to select the entire column first with Shift+Space bar. So, Shift+Space bar, Ctrl+”+” is the keyboard shortcut to insert a row.

    I realized that I need to update my screenshots above to reflect that. I don’t think I made it clear enough. Please let me know if you have any other questions. Thanks Geoff!

    Reply
Peter - January 18, 2016

Is there a shortcut for clicking on the + – to open or close the group?

Reply
    Jon Acampora - January 22, 2016

    Hi Peter,
    Great question! Yes, if you have a cell selected inside the row or column you want to expand/collapse then the following shortcuts will work.

    Show Details (Expand Group): Alt,A,J
    Hide Details (Collapse Group): Alt,A,H

    These are the shortcut keys to the Show/Hide Details buttons on the Data tab of the ribbon.

    If you want to expand/collapse all groups on the worksheet then hit Ctrl+A first to select all cells. You might have to hit Ctrl+A multiple times depending on if your current selection is in a data range or Table.

    Let me know if you have any questions. Thanks!

    Reply
Jenni P - October 21, 2015

Question about #3 – AutoFit Column Width – can this be used with a pivot table? The first 2 rows typically expand because the top left most cell will explain that data in the table (i.e. “Sum of Boxes”) and the cell next to it will say “Column Labels”. When my labels are narrower than these it auto fits to this width – I would LOVE for it to auto fit to the data actually in the Row and column labels area. Thanks for your help!

Reply
    Jon Acampora - October 21, 2015

    Hi Jenni,
    Great question. Yes, the AutoFit Column Width feature can be used with Pivot Tables. Select the cells in the values area, then do the autofit (Alt+H,O,I).

    The problem that you might be experiencing is that each time you refresh the pivot table, the columns autofit back to the width of the header. This is an option in the pivot table that can be turned off.

    Right-click the pivot table and choose PivotTable Options… Then uncheck the checkbox on that says “Autofit column widths on update”. Here is a screenshot.

    Pivot Table Options Autofit Column Widths

    I hope that helps. Please let me know if you have any questions. Thanks!

    Reply
      Jenni P - October 23, 2015

      Thanks so much! That really cuts out some aggravation!

      Reply
Pablo Baez - October 2, 2015

Hi John,
Excellent tips. I love shortcuts.
If the shortcut Ctrl+Shift+) to Unhide Columns doesn’t work, it’s a Windows set up issue. Follow these instructions to fix it:
• Click Start, and then click Control Panel.
• Double-click Regional and Language Options.
• Click Keyboards and Languages tab, and then click Change keyboards…
• Click Advanced Key Settings tab, and select Between input languages.
• Click Change Key Sequence…
• For Switch Keyboard Layout, select Not Assigned.
• Click OK to close each dialog box.
Thanks,
Pablo

Reply
Jane Norico - October 1, 2015

Thank you very much Sir Jon..,!!!

Reply
Patricia McCarthy - September 30, 2015

CTRL +D is my favorite. Copies whatever is in the cell above.

Reply
    Jon Acampora - September 30, 2015

    Thanks Patricia! That’s another great shortcut that I don’t use as often as I should. Ctrl+R copies from the cell to the left, which can be another handy one.

    Reply
      kool - November 22, 2016

      DO we have any shortcut to copy from left cell as well ?

      Reply
        Jon Acampora - December 1, 2016

        Hi Kool,
        Ctrl+R will copy from the left as I mention above. I don’t believe there is a shortcut to copy from the right, if that is what you are looking for.

        Reply
Nate - September 30, 2015

Alt H O I was a helpful tip. It’s one of those formatting shortcuts I should have known all along, but instead chose to go around and click on column headers one by one…
Shift Alt Left Arrow was also super helpful – I get a lot of reports from our system with the stupid groupings that i always have to go in and clear out.

Reply
Evan - September 30, 2015

I work with Excel, though I would not call myself an Excel Ace by any stretch. However thank you very much for the tips that will save me time as I work in Excel. Sometimes the simple tips for the everyday are the best

Reply
Teri - September 30, 2015

Upside down screen:
Someone taught me this trick a while back and when I turned it back upright all of the desktop icons were rearranged. Be careful whose computer you play tricks on. :-\

Reply
Anna - September 30, 2015

Inside an Excel Table you can use Ctrl++ (plus character) to insert rows and Ctrl+- (minus character) to delete rows, without mark the row or column first.

Reply
    Jon Acampora - September 30, 2015

    Thanks for the tip Anna! One small caveat to that is if the selected cell is blank and the column of the selected cell contains blanks, then Ctrl+- will delete the Table column instead of the row. I’m not sure of the exact rule on how this works, but it can happen. Either way, your tip is awesome. Thanks again for sharing! 🙂

    Reply
Zee22 - September 30, 2015

This was awesome, thank you very much for posting! I feel like shortcuts can often be ignored and this was very helpful.

Reply
    Jon Acampora - September 30, 2015

    Thanks Zee! I agree. I’m a big fan of shortcuts because they can save a lot of time with repetitive tasks.

    Reply

Leave a Reply:

FREE Live Webinar 

The 5 Secrets to Understanding Pivot Tables
x

Take Your Excel Skills & Career to the Next Level

10 Excel Pro Tips eBook

Get my eBook & FREE weekly updates to help you learn Excel.

x