Microsoft Excel Shortcuts

Make life simpler with these short cut keys in Microsoft Excel. Save Time & Increase Productivity!

Ever since I wrote about how to view all the formulas in Excel using a single click, I have been requested for more such Excel Shortcuts that save time. So here goes… There are some absolute gems that have been my favorite for years!

Shortcuts that work inside Excel Worksheets

  • Ctrl + F: Display the Find & Replace Dialog box, with Find selected
  • Shift + F4: Repeat Last Find
  • Ctrl + Z: Undo last action. Works for multiple levels
  • Ctrl + Y: Redo last action.
  •  F11: Create and Insert a Chart based on the selected data. Chart is added in a separate sheet.
  • Alt + F1: Creates a inserts a chart based on the currently selected data as an embedded chart object.
  • Ctrl + K: Insert a Hyperlink in a cell

Format Cells

  • Ctrl + 1: Format Cells Dialog box
  • Ctrl + 2: Apply or remove Bold formatting. Also works as Ctrl + B
  • Ctrl + 3: Apply Italic formatting to selected text
  • Ctrl + 4: Underline or remove the underline from the selected data. Also works as Ctrl + U

Apply Number Formatting

  • Ctrl + Shift + $: Apply Currency format with 2 decimal points
  • Ctrl + Shift + ~: Apply the General number format
  • Ctrl + Shift + %: Apply the Percentage format with no decimal places at all.
  • Ctrl + Shift + #: Apply the date format with full day, month and year showing.
  • Ctrl + Shift + @: Apply the time format with hours, minutes, AM or PM showing.
  • Ctrl + Shift + !: Apply the number format with two decimal places, a comma separator for the thousands place, and a minus sign for negative numbers.
  •  

    Want to Improve Your Excel Skills?

    Learn the Key Features of Excel Quickly & Easily, by Joining the
    Online Training on Basic / Intermediate Excel.

    To Get Most out of Excel, Learn the  Pivot Table techniques in our
    Pivot Table Masterclass Training
    !

 Shortcuts for Formulas

  • Alt + =: Auto sum formula is inserted
  • Shift + F3: Insert Function dialog box is opened
  • F4: Cycle through the four states of Relative referencing (A1) to Absolute referencing ($A$1)
  • Ctrl + Shift + Enter: Enter an Array Formula
  • F9: Calculates all the worksheets in all open workbooks
  • Ctrl + `: Shows all formulas. Toggle switch that shows and hides the formulas. If you can’t find the key, you can locate it just above the left Tab key. My favorite shortcut.
  • F2: Edit the formula or selection in any cell
  • F3: Paste a defined name into a formula. Using Range Names.
  • Ctrl + F3: Define a range name for a single cell or a range of cells.

Managing Workbooks

  • Ctrl + F4: Close the currently selected workbook window.
  • Ctrl + N: Open a New and blank workbook in Excel
  • Ctrl + Tab: Move to the Next Worksheet within the workbook.
  • Ctrl + Shift + Tab: Move to the Previous worksheet within the same workbook
  • Ctrl + F9: Minimize the current workbook
  • Ctrl + F10: Restore the selected workbook into a full window
  • F12: Save As diaglog box to save the workbook
  • F7: Do a Spell check in Excel
  • F1: Ask for Help ( internal Excel in built help pops up)
  • Shift + F7: Display the Thesaurus
  • Alt + F8: Displays the macro dialog box
  • Alt + F11: Pops up the Visual Basic Editor for editing the macros.

Hopefully these macros will help you save time and improve your productivity.

If you have any other shortcut which you find useful, do send me a note. I would love to hear from you. You can send it to vinai@excelchamp.net.

Cheers,
Vinai Prakash

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!


I teaches Excel, Advanced Excel techniques, and Dashboarding techniques in various countries. If you have a group of 10 or more participants,  I can come down to do a workshop for your group in your country – Vinai

Do You Use These Features of Microsoft Excel?

Most people hardly use the most useful features available in Microsoft Excel. Many are just using Excel as a calculator to do basic calculations like adding or subtracting numbers. This is a gross under use of Excel’s vast potential and feature rich functionality.

Do a quick check, and see if you use these advanced features of Microsoft Excel in your day to day work to improve your productivity and efficiency.

  1. Finding the Top 10 Customers or Finding the Bottom 5 Performers in the organization
  2. Give Names to Range of Cells, and then use them in formulas for easy referencing and decoding – like =Salary – CPF + Allowance
  3. Exploit Pivot Tables to Summarize the data and slice & dice it in any way – like finding sales by product groups, or calculating productivity by department, or calculating sales by department by product by area.
  4. Write Macros to automate routine things that save you a huge amount of time – example creating different pivots, charts, tables, and doing complex calculations, or compiling the cost benefit ration, cash flow statement automatically.
  5. Highlight values that are above or below a certain threshold – like all sales above $25,000 to be highlighted, or all products with a net profit margin of less than 5% be highlighted.
  6. Sort the values in Ascending, Descending or any Customized sorting order – like sorting in order of Manufacturing, Accounts, Sales departments.
  7. Use advanced filtering conditions, and be able to filter data using multiple different criteria – like salary > 50,000 and sales <100,000 or Zone in East, West.
  8. Create fantastic charts that portray the given business situation perfectly. There are over 50 different types of charts to choose from, and each has its edge, advantages and a reason. Do you know when to use which type of chart – like two axis charts, stacked column and line charts, bubble charts, pie, slice of a pie etc.
  9. Create management dashboard that are dynamic, and provide a complete snapshot of the key business KPIs in the company – change the chart values at the click of a checkbox or change in a dropdown value
  10. Use Excel’s advanced What-If analysis to do projections for future, forecasting, trend analysis etc. with ease
  11. Use Lookup tables to find any value or corresponding value from a table using advanced functions and formulas – find values that in the left of the looked up value
  12. Protect certain cells from data entry, and hide the formulas from other cells. Ensure that only certain values are keyed in the cells to avoid data discrepancies.

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


This is just the tip of the iceberg… These are common things that can be done easily with Excel’s in-built features.

So how many of these did you know? And how many would you like to learn more about? Even if you learn one new trick in Excel, it will save you immense time and improve your productivity. Investing in Microsoft Excel Training bears fruit in no time, and is a no brainer.

Microsoft Excel is really extremely powerful. Each version of Microsoft Excel – be it Excel 2007, or Excel 2010 or Excel 2013, Excel 2016 or Office 365 adds more and more features to the already powerful dynamite of a package.

At ExcelChamp, we teach people how to leverage the maximum power out of Microsoft Excel in short training courses.

So what are you waiting for? If you would like to learn any one or more of such useful features of Microsoft Excel, just let us know. We provide online training through videos, which will show you each click, step by step, so you can master the new techniques easily, with exercises, and practical examples.

Go ahead, equip your team with the right skills. Get everyone on board to learn the basic and advanced features of Microsoft Excel, and Be Awesome in Excel!

Email to us to know more about Online Excel Training at ExcelChamp.Net.

Cheers,
VInai Prakash, PMP, ITIL, GAP, Six Sigma, Excel Guru

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!

How To Count Cells With a Certain Value in Excel

There are several instances when you need to count the number of cells that contain a certain value.

For example, you want to:

  • Count if a product code is duplicated or not
  • Count the existence of a text string in a given range of cells

To do this, there are several different ways in Microsoft Excel.

Method 1: Use Sum & If Functions in Excel

=SUM( IF(range=”text”, 1, 0))

Note that this is an array formula, meaning that it must be keyed in a special way. Do not simply press Enter key to finish typing this formula. You must press CTRL + SHIFT + ENTER together.

Once you key in the array formula, it looks like below ( this formula searches for the value of 5 inn the cell ranging from A1 to C3. If it finds a 5, it counts a 1. All the counts are then Summed Up.)

=SUM( IF( A1:C3 = 5, 1, 0) )

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


Method 2: Use the inbuilt Countif Function of Excel

 =COUNTIF(A1:C3, “text”)

Note that this is a simple and straight forward way. It is not considered an Array function. Just key it in, and press the Enter key.

Voila, it shows you the correct count.

There you are! Two Simple ways to count the number of occurrences of a value in a range of cells in Excel.

These above 2 methods work in all versions of Excel, on the PC and on the Mac.

Hope you will benefit from them!

Cheers,
Vinai Prakash

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!


Vinai conducts workshops to enable all Excel enthusiasts in learning simple tips, tricks, techniques in Excel. Join a 2 day workshop in Singapore, or email us the city where you want to have the workshop conducted. We can

How to Find the Second Highest Value in Excel (Every Case)

To find the second highest (second largest) value in Excel, use =LARGE(C2:C9,2). LARGE returns the Nth largest number in a range, so change the 2 to 3 for the third largest, 4 for the fourth, and so on. For the second smallest, use =SMALL(C2:C9,2).

That one formula covers most cases. But a few situations trip people up: duplicate values, finding the second largest per group, and getting the name next to the number. This guide handles each one, using the same small table throughout so you can follow along.

Quick Answers: Which Formula Do I Need?

I want… Formula (sample table below) Works in
Second largest value =LARGE(C2:C9,2) All versions
Second smallest value =SMALL(C2:C9,2) All versions
Second largest distinct value (skip ties) =LARGE(C2:C9,COUNTIF(C2:C9,MAX(C2:C9))+1) All versions
Second largest distinct value (shorter) =MAXIFS(C2:C9,C2:C9,"<"&MAX(C2:C9)) Excel 2019 and later
Second largest distinct value (dynamic arrays) =LARGE(UNIQUE(C2:C9),2) Microsoft 365, Excel 2021 and later
Second largest for one group =LARGE(IF(B2:B9="East",C2:C9),2) All versions (Ctrl+Shift+Enter in Excel 2019 and earlier)
Name next to the second largest =INDEX(A2:A9,MATCH(LARGE(C2:C9,2),C2:C9,0)) All versions
Top 3 rows with names =TAKE(SORTBY(A2:C9,C2:C9,-1),3) Microsoft 365, Excel 2024
Higher of two numbers =MAX(A1,B1) All versions

The Sample Data Used in This Guide

Every example below uses this sales list in cells A1:C9 (headers in row 1). Notice two things: the highest sale of 800 appears twice, and 650 appears twice. Both matter later.

A: Rep B: Region C: Sales
Asha East 500
Ben West 800
Chen East 800
Divya West 650
Elena East 720
Farid West 300
Gina East 650
Hao West 400

Sorted from highest to lowest, the sales are 800, 800, 720, 650, 650, 500, 400, 300.

Find the Second Largest Value with LARGE

MAX only returns the biggest number, so it cannot give you the runner-up. LARGE can. Its syntax is LARGE(array, k), where array is your range and k is the position, counting down from the largest.

=LARGE(C2:C9,2) returns 800.

Why 800 and not 720? Because 800 appears twice, LARGE counts it as 1st and 2nd. That is correct behaviour for ranking, but often not what people mean by “second highest”. The next sections fix that.

  • =LARGE(C2:C9,1) returns 800 (same as MAX).
  • =LARGE(C2:C9,3) returns 720.
  • =LARGE(C2:C9,5) returns 650.

You can also point at a range that spans several columns, such as =LARGE(B2:D20,2). LARGE looks at every number in the block.

Find the Second Smallest Value with SMALL

SMALL works the same way from the bottom. =SMALL(C2:C9,2) returns 400 (the smallest is 300). The same rule applies: if the lowest value is repeated, SMALL counts each copy as its own position.

Second Highest Value When There Are Duplicates

If you want the second highest distinct value, so the two 800s count as one, pick one of these. All three return 720 on the sample data.

Option 1: LARGE with COUNTIF (works in every version)

=LARGE(C2:C9,COUNTIF(C2:C9,MAX(C2:C9))+1)

COUNTIF counts how many times the maximum appears (2). Adding 1 skips past all of them, so LARGE jumps to position 3, which is 720. If the maximum appears only once, it simply returns the 2nd largest.

Option 2: MAXIFS (Excel 2019 and later)

=MAXIFS(C2:C9,C2:C9,"<"&MAX(C2:C9))

This asks for the biggest value that is smaller than the overall maximum. MAXIFS is not available in Excel 2016 or earlier.

Option 3: UNIQUE with LARGE (Microsoft 365 and Excel 2021 and later)

=LARGE(UNIQUE(C2:C9),2)

UNIQUE strips the duplicates first, leaving 500, 800, 650, 720, 300 and 400 (in their original order). LARGE then picks the 2nd largest of those, which is 720. It is the easiest to read, and you can change the 2 to get the third or fourth distinct value.

Second Largest Value for Each Group or Criteria

To find the second largest sale for the East region only (answer: 720; East has 500, 800, 720 and 650), use one of these.

Microsoft 365 and Excel 2021 and later

=LARGE(FILTER(C2:C9,B2:B9="East"),2)

FILTER keeps only the East sales, and LARGE picks the second biggest. For West, the same formula returns 650.

Older versions (array formula)

=LARGE(IF(B2:B9="East",C2:C9),2)

Press Ctrl+Shift+Enter to confirm it in Excel 2019 and earlier. IF returns FALSE for non-East rows, and LARGE ignores those.

Any version, no Ctrl+Shift+Enter

=AGGREGATE(14,6,C2:C9/(B2:B9="East"),2)

Function 14 is LARGE and option 6 ignores errors. Dividing by FALSE (zero) creates errors for the non-East rows, which AGGREGATE then skips. Microsoft’s documentation notes that functions 14 and 15 need the k argument.

Get the Name Next to the Second Largest Value

Usually you need the person or product, not just the number.

INDEX and MATCH (all versions)

=INDEX(A2:A9,MATCH(LARGE(C2:C9,3),C2:C9,0))

This returns Elena, the rep behind the second highest distinct sale (720). I used 3 here because the two 800s take positions 1 and 2. If you use LARGE(C2:C9,2) you get 800, and MATCH returns only the first 800, which is Ben. Chen is silently ignored.

XLOOKUP (Microsoft 365, Excel 2021 and later)

=XLOOKUP(LARGE(C2:C9,3),C2:C9,A2:A9)

Also returns Elena. XLOOKUP defaults to an exact match, so you do not need a match-type argument. It is not available in Excel 2016 or 2019.

Return every tied name with FILTER

=FILTER(A2:A9,C2:C9=LARGE(C2:C9,2))

Returns Ben and Chen, spilling into two cells, because both sold 800. Wrap it in TEXTJOIN(", ",TRUE,...) if you want them in a single cell.

Top N List with Names

=TAKE(SORTBY(A2:C9,C2:C9,-1),3)

SORTBY sorts the whole table by Sales from high to low, and TAKE keeps the first 3 rows. The result spills as: Ben, West, 800; Chen, East, 800; Elena, East, 720. Change the 3 to any number you like. TAKE is available in Microsoft 365 and Excel 2024, not Excel 2021 or earlier.

Top 3 in any version: type =LARGE($C$2:$C$9,ROWS($1:1)) in a cell and copy it down three rows. ROWS counts 1, 2, 3 as you fill down, so you get 800, 800, 720. Use SMALL the same way for the bottom 3.

If you still sort and copy values by hand for weekly reports, these formulas save that time, because they update themselves when the data changes. Our quick tip on re-sorting a list or table covers the manual route.

Ignore Zeros, Blanks and Errors

  • Blanks and text: LARGE and SMALL skip empty cells and text in a range, so you do not need to clean them out first. Numbers stored as text are also skipped, which is a common reason for a “wrong” answer.
  • Zeros: A zero is a real number, so SMALL will happily return it. To ignore zeros, use =SMALL(IF(C2:C9<>0,C2:C9),2) (Ctrl+Shift+Enter in Excel 2019 and earlier), or =AGGREGATE(15,6,C2:C9/(C2:C9<>0),2).
  • Errors: If one cell in the range shows #N/A or #DIV/0!, LARGE returns that error too. =AGGREGATE(14,6,C2:C9,2) ignores error values and returns the second largest of the rest.

Highlight the Second Largest Value

  1. Select A2:C9.
  2. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
  3. Enter =$C2=LARGE($C$2:$C$9,2) and pick a fill colour.

On the sample data, both the Ben and Chen rows are highlighted because both have 800. To highlight the top three instead, use Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items and change 10 to 3.

Higher (or Lower) of Two Values

Not comparing a whole list, just two cells? Use =MAX(A1,B1) for the higher number and =MIN(A1,B1) for the lower one. No IF needed.

Common Mistakes and Errors

  • #NUM! error. Either k is 0 or negative, k is larger than the count of numbers in the range, or the range has no numbers. With only 8 numbers, =LARGE(C2:C9,9) returns #NUM!.
  • Getting the maximum twice. This is the duplicate issue above. If your answer looks the same as MAX, use one of the distinct-value formulas.
  • The wrong name returned. MATCH with 0 stops at the first match. For ties, use FILTER.
  • #SPILL! error. FILTER, UNIQUE and TAKE spill into neighbouring cells. Clear the cells in their way.
  • Numbers that are really text. If a value is left-aligned or has a green triangle, it is text and LARGE ignores it. Convert it to a number first.

The basic LARGE and SMALL formulas work the same way in Google Sheets and Excel for the web.

Frequently Asked Questions

How do I find the second highest value in Excel?

Use =LARGE(range,2). For example, =LARGE(C2:C9,2) returns the second largest number in C2:C9. LARGE counts duplicates as separate ranks, so if the top value appears twice you get that value again.

How do I find the second highest value if there are duplicates?

Use =LARGE(range,COUNTIF(range,MAX(range))+1), which works in every version. In Microsoft 365 or Excel 2021 and later you can use =LARGE(UNIQUE(range),2). In Excel 2019 and later, =MAXIFS(range,range,"<"&MAX(range)) also works.

How do I find the second highest value in a range for a specific category?

In Microsoft 365, use =LARGE(FILTER(values,categories="East"),2). In older versions, use =LARGE(IF(categories="East",values),2) with Ctrl+Shift+Enter, or =AGGREGATE(14,6,values/(categories="East"),2), which needs no special entry.

How do I return the name of the person with the second highest value?

Combine INDEX and MATCH: =INDEX(names,MATCH(LARGE(values,2),values,0)). In Microsoft 365 or Excel 2021 and later, =XLOOKUP(LARGE(values,2),values,names) does the same. If two people tie, only the first is returned, so use FILTER to list all of them.

What is the formula for the second smallest or second lowest value?

Use =SMALL(range,2). Change the 2 to find the third, fourth or any other lowest value.

How do I find the second max if there are blanks or errors in my data?

LARGE skips blanks and text automatically. For errors, use =AGGREGATE(14,6,range,2), where 14 means LARGE and 6 means ignore errors.

Keep Learning

Learn the lookup functions used above in Master These Excel Lookup Functions To Save Time, and see where LARGE fits among the essentials in Top 12 Most Important Excel Functions. If duplicates are your real problem, read How to Find and Remove Duplicates in Excel Quickly. To summarise whole tables without formulas, try How To Summarize Data in Excel: Top 10 Ways.

Want to build these skills faster? The Excel for Beginners video course takes you from the basics to confident formula work, at your own pace.

Display the File Name & File Path in Excel (PC & Mac)

Many a time, it is good to Display the location of the file in Excel.

Not just the file name, but the entire path of the file. It is a good reference to make sure you are working on the correct file and is also good if you print out the Excel. With this option, the file path always gets printed on paper..

How to Write a Formula that will Display the File Path in Excel, automatically. 

One useful formula that can assist us is the CELL formula. I bet you didn’t know about this in-built Excel Function…

The CELL function can help us to display the address, colour, format, type or width of any cell.

The CELL Function takes a maximum of 2 arguments, and only the first one is mandatory.

=CELL(info_type, [reference])

So, if you write =CELL(“filename”) in any cell, you will get the Full Pathname of this Excel file, along with the Sheet Name.

For example, I got the filename displayed as below:

D:\[email-blasting-migration.xlsx]Sheet1

According to the Excel Help, the CELL function  has the following arguments:

  • info_type Required. A text value that specifies what type of cell information you want to return. The following list shows some of the possible values of the info_type argument and the corresponding results.
    info_type Returns
    “address” Reference of the first cell in reference, as text.
    “col” Column number of the cell in reference.
    “color” The value 1 if the cell is formatted in color for negative values; otherwise returns 0 (zero).
    “contents” Value of the upper-left cell in reference; not a formula.
    “filename” Filename (including full path) of the file that contains reference, as text. Returns empty text (“”) if the worksheet that contains reference has not yet been saved.
    “format” Text value corresponding to the number format of the cell. The text values for the various formats are shown in the following table. Returns “-” at the end of the text value if the cell is formatted in color for negative values. Returns “()” at the end of the text value if the cell is formatted with parentheses for positive or all values.

Display only the Excel File Name, without the Sheet Name

To only print the File name, you can use this long formula:

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

Keep in mind that the file should be saved somewhere. If you just open a new workbook, and try these formulas, you will get a #VALUE ERROR.  This error will disappear automatically once the file is saved, and the error will be replaced with the correct full file path name, and file name.

This formula to display the filename in Excel also works on the Mac. Any Excel for Mac version, including Excel X for Mac, to Excel 2004, 2008, 2011 for Mac also work fine in displaying the filename.

For example, for a file on Mac with the path HD:Users:local:Desktop, the formula returns
HD:Users:local:Desktop:(filename)Sheet1

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


Displaying the FilePath only

While writing macros in Excel, you may need the file’s path only, to pick up other files, or for any other reason. Just use this to get only the file’s path in Excel

=LEFT(CELL(“filename”,A1),FIND(“[“,CELL(“filename”,A1),1)-1)

In this formula, we remove the Sheet Name, which starts with the [ character.

How To Display Filename & File Path in Excel Worksheet Header or Footer

If you wish to display the file name and/or file path in the Excel sheet’s header or footer, then it is extremely simple. Simply go to the Ribbon. Choose Insert > Header & Footer

Excel File Name, File Path

All you need to do is click on the File Path, File Name icons.

Alternatively, if you want to type it yourself, simply type the following in the header or the footer in Excel:

&[Path]&[File]

Use &[Path] for only the File Path, and &[File] for only the File’s name.

Hope it helps you in your life with Excel.

Now you can confidently display the filename and the file path in Excel

With the File Name of Excel files visible in the header, with the File Path, you won’t  lose a file in the wrong location & find what you are looking for easily!

Do let me know if you need any other functions in Excel, or if you are facing a problem in Excel. We can help you to solve everyday issues in Excel easily at ExcelChamp.Net.

And subscribe to the Excel Tips Newsletter for more such tips to improve productivity in Excel.

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!


Cheers,
Vinai Prakash

Vinai is the founder and principal trainer for Microsoft Excel Tips and Techniques seminars all over the world. To book Vinai to conduct an Excel training at your office for your company, do email to vinai@excelchamp.net.