How to Find & Remove Duplicates in Excel Quickly

How To Find & Remove Duplicates in Excel (Step by Step , Video Tutorial)

With thousands of rows in today’s spreadsheets, it is virtually impossible for anyone to spot a duplicate value or duplicate row in Excel visually or manually. But you’ll be getting the wrong picture, and your analysis will be wrong until you remove the duplicates. So it is extremely important to De-Duplicate your Data carefully in the Excel sheet, before you begin your data analysis.

Fortunately, since Microsoft Excel 2007, it has been extremely easy to find Duplicates, and Remove them in a single click.

In this step by step article, and a tutorial video on How to Find Duplicates in Excel, and How to Remove Duplicates in Excel Sheet, you’ll learn a couple of hidden gems of Excel features and functionality.

With Office 365, and all the way back to Microsoft Excel 2007, there has been steady enhancements in different Excel versions in terms of finding and tracking duplicates, and even removing them.

Now it is extremely easy to spot duplicates, and there are multiple ways to find duplicates or eliminate duplicates from your Excel workbooks and worksheets.

Let’s look at How to Find Duplicates in Excel first. Then we will see how to remove duplicates in Excel sheet. And we will also show you Excel formulas to remove duplicates. Use any of these methods to quickly remove duplicate cells in Excel.

Step 1: Spot a duplicate value, and get it to change its color automatically

In this simple and easiest method to find duplicate rows in Excel, we make use of Conditional Formatting in Excel, available on the Home Tab.

  • Simply select the data range where you want to spot any duplicate values, and then click on Conditional Formatting. A drop down menu of choices appears. Select the first choice – Highlight Cell Rules. Then select the Last option –Duplicate Values. The short cut key combination is Alt +H L H D.highlight_cells_duplicate_value

Step 2. Select your favorite color to highlight the duplicate values.

Here I have chosen the Light Red color.duplicate_values_popup

 

Step 3. Both the duplicate values are now highlighted.

finding duplicate values in Microsoft Excel

There you are. A quick and nifty way to find the duplicate values in any column, quickly.

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 method uses the EXACT duplicates to highlight.

If you want to show partial matches in terms of duplicates or similar to duplicates, you can use another interesting technique.

Using Conditional Formatting in Excel to Find Partial Matches

Here we use the “Text That Contains” setting under Conditional Formatting > Highlight Cell Rules >

With this setting, and keying in any value, it will be able to find Partial Matches of values.

Conditional Formatting - Text That Contains to Identify Partial Matches
Conditional Formatting – Text That Contains to Identify Partial Matches

I am searching for names that contain the word “Ram”.

Partial Match in searching for Duplicate Values in Excel
Partial Match in searching for Duplicate Values in Excel

As you can see, Ram Kumar was highlighted, due to Ram, but Krish was also highlighted, because the full name contains the word “ram” in the last name, Venkataraman.

This way, you can pick partial matches to be highlighted in Excel, using Conditional Formatting technique.

And if you want to do it again and again with different values to find, it is better to set a cell to the value being found. Then set the Conditional Formatting to search for the value in that cell.

I have demonstrated this in the video on How to Find & Remove Duplicates in Excel. Click to watch it and see how this is done properly. This guided video will help you in identifying and eliminating duplicates easily.

How to Remove Duplicates in Excel?

We will talk about another nifty way to eliminate duplicates in Excel, once for all, in the next article.

If you were to head to the Data Tab, and look under the Data Tools group, you’ll find the “Remove Duplicates” button hiding there. Some versions of Excel show a small icon, others show the full word, and some versions have a huge icon, and the words “Remove Duplicates” visible in full.

Check carefully to identify the button in your version of Excel. But all Excel versions since Excel 2007 have this button to Remove Duplicates.

STEPS TO REMOVE DUPLICATE ROWS IN EXCEL

With this option, simply select the entire data range, and then click on this “Remove Duplicates” button. It will identify rows that are EXACT DUPLICATES, and simply remove them.

Then Excel will notify you that X number of rows containing duplicates were found, and Removed.

However, this Remove Duplicates button click WILL NOT show you which records were removed. 🙁

Some people find this feature a bit of a risk. Thus, it is better to use Conditional Formatting technique described earlier to SEE the Duplicates visually, BEFORE REMOVING them.

With these 2 techniques, you can FIND the Duplicates, SEE them visually, DOUBLE CHECK that the correct ones are highlighted, and then only REMOVE the Duplicates.

Better Safe than Sorry!

How to Compare Two Excel Sheets for Duplicates and Highlight the Duplicate Data

Comparing two Excel sheets for duplicates and highlighting the duplicate data can be done using a few different methods. Here’s a step-by-step instruction for a couple of common approaches:

Method 1: Using Conditional Formatting in Excel

  1. Open Your Excel Workbook: Make sure both sheets you want to compare are in the same workbook.
  2. Select the Range in the First Sheet: Click on the first cell of the range you want to compare and drag to select the entire range.
  3. Go to Conditional Formatting: On the Home tab, in the Styles group, click on ‘Conditional Formatting’.
  4. New Rule: Click on ‘New Rule’.
  5. Use a Formula to Determine Which Cells to Format: Select this option.
  6. Enter Comparison Formula:
    • Suppose you are comparing Sheet1 to Sheet2. The formula will look something like this:
      =COUNTIF(Sheet2!A:A, A1)>0

      This formula assumes you’re comparing column A of both sheets. Adjust the range (e.g., A:A or B:B) and cell (e.g., A1, B1) to suit your data.

  7. Set Format: Click on ‘Format’, choose a highlighting color under the ‘Fill’ tab, and click OK.
  8. Apply and OK: Click OK to apply the conditional formatting. Duplicates will be highlighted in the chosen color.
  9. Repeat for the Second Sheet: Now, do the same for the range in the second sheet you’re comparing.

Method 2: Using Excel’s ‘Remove Duplicates’ Feature

  1. Copy Data to a New Sheet: If you want to keep the original sheets unchanged, copy the data from both sheets into a new sheet, one below the other.
  2. Select the Combined Data: Click on the first cell and drag to select the entire range.
  3. Data Tab: Go to the ‘Data’ tab on the ribbon.
  4. Remove Duplicates: Click on ‘Remove Duplicates’.
  5. Choose Columns: In the Remove Duplicates dialog box, choose the columns you want to check for duplicate information, then click OK.
  6. Duplicates are Removed: Excel will remove duplicate rows and show a message indicating how many duplicates were removed and how many unique values remain.
  7. Highlight Original Data: You can then manually or using conditional formatting (as described in Method 1) highlight these duplicates in your original sheets.

Using Excel Formulas to Find Duplicate Data in Excel Sheets

The VLOOKUP, INDEX, and MATCH functions in Excel can be very useful for identifying duplicates across sheets or within a sheet.

However, it’s important to note that these functions can identify duplicates, but they don’t directly remove them. You should generally use these functions in combination with conditional formatting to highlight duplicates or with other Excel features to remove them. Let’s go through how to use each function for identifying duplicates in Excel Sheets:

VLOOKUP to Identify Duplicates

The VLOOKUP function searches for a value in the first column of a range and returns a value in the same row from a specified column.

  1. Select a Cell for the VLOOKUP Result: Click on a cell where you want to display the result (e.g., next to your data).
  2. Enter the VLOOKUP Formula:
    • Example formula: =VLOOKUP(A2, Sheet2!A:A, 1, FALSE)
    • This formula checks if the value in A2 of the current sheet exists in column A of Sheet2.
  3. Copy the Formula Down: Drag the fill handle down to copy the formula to other cells.
  4. Identify Duplicates: If VLOOKUP finds a match, it will display the matching value; if not, it will show an error. You can use conditional formatting to highlight cells where VLOOKUP doesn’t return an error, indicating a duplicate.

INDEX and MATCH to Identify Duplicates

The combination of INDEX and MATCH is often used as an alternative to VLOOKUP. MATCH finds the position of a value in a range, and INDEX returns a value at a given position in a range.

  1. Select a Cell for the Result: Choose where you want the result to appear.
  2. Enter the INDEX-MATCH Formula:
    • Example formula: =INDEX(Sheet2!A:A, MATCH(A2, Sheet2!A:A, 0))
    • This formula searches for the value in A2 of the current sheet in column A of Sheet2 and returns the corresponding value.
  3. Copy the Formula: Drag down the formula as needed.
  4. Highlight Duplicates: Use conditional formatting to highlight cells where INDEX-MATCH returns a value, indicating a duplicate.

Removing Duplicates Using a Formula

While there’s no direct formula to remove duplicates cells in Excel, you can use a combination of functions to create a list that excludes duplicates. One common approach is using the IF, COUNTIF, and an array formula.

  1. Create a New Column: In a new column next to your data, you’re going to enter a formula that will flag duplicates.
  2. Enter the Array Formula:
    • Example formula: =IF(COUNTIF($A$1:A2, A2)=1, A2, "")
    • This formula checks if the current value in column A has appeared before. If it’s the first occurrence, it shows the value; otherwise, it shows an empty string.
  3. Enter as an Array Formula: After typing the formula, press Ctrl + Shift + Enter instead of just Enter. This converts it into an array formula.
  4. Copy Down the Formula: Drag the fill handle down to apply this to your entire data set.
  5. Filter or Sort: Now, you can filter or sort this new column to separate unique values from duplicates.

Remember, these methods will help you identify and segregate duplicates, but to actually remove them from your data, you might have to do some manual data management or use the “Remove Duplicates” feature in Excel that we discussed earlier.

And this brings us to a close of this article. I hope that with these techniques, you can pick up duplicates in your data in Excel or remove them, as you wish.

PRO TIP: Do remember to watch the Video, for how to identify values that start with a particular Text, or End with a particular text. It is highlighted in the Video in detail, and can be very handy.

Do you have a Duplicates related question in Excel?

Simply write to us, and our Excel experts will try to help you out. Write to us at the Contact Us page on this website.

You may find these resources useful:

Cheers,
Vinai Prakash,
Founder of ExcelChamp.Net & Master Trainer for all Excel Courses at ExcelChamp.

Visit our ExcelChamp Channel on YouTube for more Excel Tips & Tricks.

Vinai is passionate about maximizing Excel to improve everyday productivity. He conducts Excel workshops in Singapore, Australia, Middle East. If you would like to engage him to train your staff in maximising Excel, do contact us.

And join our Online Excel courses to learn Excel well, and become a Pro.

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!

Master Excel Lookup Functions like VLOOKUP, HLOOKUP, INDEX, MATCH, OFFSET

How to Refresh a Pivot Table (Manually or Automatically)

Excel Functions List: 12 Essential Ones to Master (2026)

Top 12 Most Important Excel Functions & Features You Must Know

The 12 most important Excel functions to learn first are SUM, AVERAGE, COUNT, COUNTA, COUNTBLANK, COUNTIF, SUMIF, IF, ROUND, PROPER, VLOOKUP and CONCAT. Together they cover adding, averaging, counting, conditional totals, decisions, tidy-up and lookups, which is most of what people do in a spreadsheet at work.

Each one below has the syntax, a small worked example, a common mistake and a tip. After the 12, you will find the newer Microsoft 365 functions (XLOOKUP, FILTER, UNIQUE and friends) that now do some of these jobs better.

Quick Reference: The 12 Functions at a Glance

Function What it does Example formula Works in
SUM Adds numbers =SUM(B2:B6) All versions
AVERAGE Mean of numbers =AVERAGE(B2:B6) All versions
COUNT Counts cells with numbers =COUNT(B2:B6) All versions
COUNTA Counts cells that are not empty =COUNTA(B2:B6) All versions
COUNTBLANK Counts empty cells =COUNTBLANK(B2:B6) All versions
COUNTIF Counts cells that meet one condition =COUNTIF(A2:A6,"East") All versions
SUMIF Adds cells that meet one condition =SUMIF(A2:A6,"East",B2:B6) All versions
IF Returns one result if true, another if false =IF(B2>=1000,"Hit","Miss") All versions
ROUND Rounds a number to set digits =ROUND(1234.5678,2) All versions
PROPER Capitalises Each Word =PROPER(A2) All versions
VLOOKUP Finds a value in the first column, returns another column =VLOOKUP(102,A2:C4,3,FALSE) All versions
CONCAT Joins text together =CONCAT(A2," ",B2) Excel 2019 and later, Microsoft 365

Most of the examples use this small sales list. Region is in column A and sales are in column B.

A (Region) B (Sales)
2 East 1200
3 West 800
4 East 1500
5 North 950
6 West 650

1. SUM: Add Up Numbers

How to use the SUM function in Excel

SUM adds the numbers you give it. It is the first function almost everyone learns, and still the one you will use most.

Syntax: =SUM(number1, [number2], ...)

Example: =SUM(B2:B6) adds 1200 + 800 + 1500 + 950 + 650 and returns 5100.

Common mistake: Numbers stored as text. Microsoft notes that SUM ignores text values, so a column of “numbers” that are really text (often left-aligned, or with a green corner) quietly gives a total that is too low. Convert them to real numbers first.

Pro tip: Select the cell under your numbers and press Alt + = (or click AutoSum on the Home tab). Excel writes the SUM for you. For more ways to total data, see how to summarise data in Excel.

2. AVERAGE: Find the Mean

How to use the AVERAGE function in Excel

AVERAGE adds the numbers and divides by how many there are. Use it for average sales, salary, ticket count or call time.

Syntax: =AVERAGE(number1, [number2], ...)

Example: =AVERAGE(B2:B6) returns 5100 / 5 = 1020.

Common mistake: Mixing up blanks and zeros. AVERAGE ignores empty cells and text, but it counts a zero. If B6 were empty, the average of the other four would be 1112.5. If B6 held 0, it would drop to 890 for the same rows (4450 / 5).

Pro tip: Use AVERAGE together with COUNT to check how many values went into the answer.

3. COUNT: Count the Numbers

How to use the COUNT function in Excel

COUNT tells you how many cells contain numbers. Dates count too, because Excel stores dates as numbers.

Syntax: =COUNT(value1, [value2], ...)

Example: Suppose B2:B6 holds 1200, 800, the text “n/a”, 950 and one empty cell. =COUNT(B2:B6) returns 3.

Common mistake: Using COUNT on a column of names. Text inside a range is not counted, so you get 0. Use COUNTA for text.

Pro tip: Click the drop-down arrow beside AutoSum on the Home tab to insert COUNT in one click.

4. COUNTA: Count Everything That Is Not Empty

How to use the COUNTA function in Excel

COUNTA counts cells that have anything in them: numbers, text, dates, logical values and even errors. It is the one to use for headcount or “how many rows have data”.

Syntax: =COUNTA(value1, [value2], ...)

Example: On the same range (1200, 800, “n/a”, 950, empty), =COUNTA(B2:B6) returns 4.

Common mistake: Cells that look empty but are not. Microsoft notes that COUNTA counts empty text ("") returned by a formula, so a column full of such formulas still shows a count. A stray space does the same.

Pro tip: To count names in a list, point COUNTA at the whole column of names, then subtract 1 for the header. More on this in multiple ways to count in Excel.

5. COUNTBLANK: Find the Gaps

COUNTBLANK counts empty cells in a range. It is a quick check for missing data before you send a report.

Syntax: =COUNTBLANK(range)

Example: On the range B2:B6 above, =COUNTBLANK(B2:B6) returns 1.

Common mistake: Expecting zeros to count. Per Microsoft, cells containing 0 are not counted as blank, but cells with a formula returning "" are.

Pro tip: Watch the COUNTBLANK walkthrough with use cases on our YouTube channel.

6. COUNTIF: Count Cells That Meet a Condition

How to use the COUNTIF function in Excel

COUNTIF counts the cells in a range that match one condition. Use it to answer “how many orders came from East?” or “how many reps beat 1000?”.

Syntax: =COUNTIF(range, criteria)

Examples:

  • =COUNTIF(A2:A6,"East") returns 2.
  • =COUNTIF(B2:B6,">1000") returns 2 (1200 and 1500).

Common mistake: Leaving out the quotes around an operator, or typing a cell reference inside the quotes. To compare with a value in D1, join them: =COUNTIF(B2:B6,">"&D1).

Pro tip: COUNTIF is not case sensitive, and supports wildcards: "E*" matches anything starting with E. For two or more conditions, switch to COUNTIFS. See also how to count cells with a certain value.

7. SUMIF: Add Only What Matches

SUMIF adds the cells that meet a condition. It is the quickest way to get a total per region, product or month.

Syntax: =SUMIF(range, criteria, [sum_range])

Example: =SUMIF(A2:A6,"East",B2:B6) adds 1200 + 1500 and returns 2700.

Common mistake: A sum_range that is a different size from range. Microsoft says they should be the same size and shape, otherwise results can mislead and performance suffers.

Pro tip: Put the region name in a cell, such as D2, and use =SUMIF(A2:A6,D2,B2:B6). Change D2 and the total follows. Need two conditions? Use SUMIFS.

8. IF: Make Excel Decide

IF tests a condition and returns one result when it is true and another when it is false. It is the base of almost every “pass or fail”, “bonus or no bonus” sheet.

Syntax: =IF(logical_test, value_if_true, [value_if_false])

Example: =IF(B2>=1000,"Hit","Miss") returns Hit for 1200.

Common mistake: Forgetting the quotes around text results. Without them, Excel reads Hit as a name and shows #NAME?.

Pro tip: Nested IFs get hard to read after two or three levels. In Microsoft 365, Excel 2019 and later, IFS (see below) is tidier. Our IF and IFS video shows both on pass, fail and grades.

9. ROUND: Control the Decimals

ROUND changes the number itself, not just how it looks. Use it for prices, tax and anything that must add up exactly.

Syntax: =ROUND(number, num_digits)

Examples:

  • =ROUND(1234.5678,2) returns 1234.57.
  • =ROUND(1234.5678,0) returns 1235.
  • =ROUND(1234.5678,-2) returns 1200 (a negative number rounds to the left of the decimal point).

Common mistake: Using number formatting (fewer decimals on the ribbon) when you need real rounding. Formatting only changes the display, so totals can look “off by one cent”.

Pro tip: Wrap ROUND around a whole calculation, such as =ROUND(B2*1.09,2), so every result is a true two-decimal figure.

10. PROPER: Fix Names and Titles

PROPER capitalises the first letter of each word and lowercases the rest. It rescues name lists typed in ALL CAPS or all lowercase.

Syntax: =PROPER(text)

Example: =PROPER("aNNA lEE-tan") returns Anna Lee-Tan.

Common mistake: Trusting it on every name. PROPER capitalises any letter that follows a non-letter, so “andy’s” becomes “Andy’S” and “mcdonald” becomes “Mcdonald”. Check names like these by hand.

Pro tip: Build the clean names in a helper column, then copy and Paste Special as Values to replace the originals. For other text clean-up, see extracting text from variable-length strings.

11. VLOOKUP: Look Up a Value in a Table

VLOOKUP searches the first column of a table for a value and returns something from the same row. Think price lists, staff IDs and product codes.

Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Example: With the table below in A2:C4, =VLOOKUP(102,A2:C4,3,FALSE) returns 1.20.

A (ID) B (Item) C (Price)
101 Notebook 3.50
102 Pen 1.20
103 Stapler 8.90

Common mistake: Leaving out the last argument. If you omit it, VLOOKUP defaults to an approximate match (TRUE), which can return the wrong row on unsorted data. Type FALSE for an exact match.

Pro tip: VLOOKUP can only look to the right, because the lookup value must sit in the first column of the table. Microsoft now points people to XLOOKUP, covered below. Learn VLOOKUP anyway, since you will meet it in older workbooks. Watch: VLOOKUP with exact match.

Want the full comparison? Read Excel lookup functions to save time.

12. CONCAT: Join Text Together

CONCAT joins text from several cells. Use it to build full names, addresses or IDs. The old CONCATENATE function still works, but Microsoft says CONCAT replaces it and CONCATENATE stays for compatibility with earlier versions.

Syntax: =CONCAT(text1, [text2], ...)

Example: If A2 holds Anna and B2 holds Lee, =CONCAT(A2," ",B2) returns Anna Lee.

Common mistake: Forgetting the space. =CONCAT(A2,B2) gives AnnaLee. Add " " between the cells.

Pro tip: The & operator does the same job and works in every version: =A2&" "&B2. If you see #NAME?, your version may be too old for CONCAT, so use &. To join a whole list with a separator, use TEXTJOIN (below). Also see combining text columns into one.

Modern Microsoft 365 Functions Worth Learning Next

Excel has changed a lot since many “top functions” lists were written. These newer functions replace awkward older workarounds. Check your version first, because some are not in older Excel.

Function What it does Example Version (per Microsoft)
XLOOKUP Looks up in any direction; exact match by default =XLOOKUP(102,A2:A4,C2:C4,"Not found") Microsoft 365, Excel 2021 and later. Microsoft’s page states it is not available in Excel 2016 and 2019
FILTER Returns only the rows that meet a condition =FILTER(A2:B6,A2:A6="East","No sales") Microsoft 365, Excel 2021 and later
UNIQUE Returns a list without duplicates =UNIQUE(A2:A6) Microsoft 365, Excel 2021 and later
SORT Sorts a range with a formula =SORT(UNIQUE(A2:A6)) Microsoft 365, Excel 2021 and later
LET Names a calculation so you can reuse it =LET(avg,AVERAGE(B2:B6),IF(B2>avg,"Above","Below")) Microsoft 365, Excel 2021 and later
TEXTJOIN Joins a list with a separator, skipping blanks =TEXTJOIN(", ",TRUE,A2:A6) Excel 2019 and later
IFS Several IF tests without nesting =IFS(B2>=1500,"A",B2>=1000,"B",TRUE,"C") Excel 2019 and later

XLOOKUP vs VLOOKUP

XLOOKUP is the upgrade. The syntax is =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). It returns an exact match by default, can look left, and lets you set what to show when nothing is found. On the price table above, =XLOOKUP(102,A2:A4,C2:C4,"Not found") returns 1.20.

FILTER, UNIQUE and SORT

These return many results at once, which “spill” into the cells below. =FILTER(A2:B6,A2:A6="East","No sales") lists only the East rows. Without the third argument, FILTER returns a #CALC! error when nothing matches. Keep the cells below the formula empty, or the spill is blocked.

Combine them: =SORT(UNIQUE(A2:A6)) gives an alphabetical list of regions with no repeats. Here that is East, North, West.

LET, TEXTJOIN and IFS

=LET(name1, value1, calculation) stores a result under a name, so long formulas become shorter and easier to read. =TEXTJOIN(", ",TRUE,A2:A6) returns “East, West, East, North, West”. =IFS(...) replaces a chain of nested IFs, but returns #N/A if no test is TRUE, so end with TRUE,"default".

Which should you learn first? If you have Microsoft 365, start with XLOOKUP and FILTER. If you share files with people on older Excel, stay with VLOOKUP and SUMIF for those files, because newer functions show #NAME? in versions that lack them.

How to Practise These Functions

Reading is not enough. Spend 10 minutes a day on one function:

  1. Copy the sales list above into a blank sheet.
  2. Type each formula yourself rather than pasting it, and check the answer against the one shown here.
  3. Break it on purpose: add text to a number column, leave out FALSE in VLOOKUP, add a blank. See what changes.
  4. Apply it to a real file from your own work the same week.

Then add one more skill from the list. Dropdown lists make data entry cleaner and pair well with COUNTIF and VLOOKUP, so learn how to make a dropdown list in Excel next. When these feel easy, follow our guide to learning advanced Excel fast, or browse 201 things to learn in Microsoft Excel.

Want to learn Excel step by step with video?

Our Excel for Beginners course takes you from the basics to confident formulas, with lessons you can replay at your own pace. See the Excel for Beginners course.

Frequently Asked Questions

What are the most important Excel functions?

The ones almost every user needs are SUM, AVERAGE, COUNT, COUNTA, COUNTIF, SUMIF, IF, ROUND and a lookup function. This article adds COUNTBLANK, PROPER and CONCAT for everyday data clean-up. No official ranking exists, so the “most important” list depends on your job.

What is a function in Excel?

A function is a built-in calculation you call by name, such as SUM or PI(). A formula is whatever you type after the equals sign, and it can contain functions, cell references, operators and constants.

What are the types of functions in Excel?

Microsoft groups worksheet functions by what they do. The categories include Math and trigonometry, Statistical, Logical, Text, Date and time, Lookup and reference, Financial, Information, Database, Engineering, Cube and Web. SUM sits in Math and trigonometry, IF in Logical, and VLOOKUP in Lookup and reference.

What is the difference between a formula and a function in Excel?

=B2*1.09 is a formula with no function. =SUM(B2:B6) is a formula that uses the SUM function. Every function call sits inside a formula.

Is VLOOKUP still worth learning?

Yes. VLOOKUP works in every version of Excel and appears in countless existing workbooks. If you use Microsoft 365 or Excel 2021 and later, learn XLOOKUP as well, since Microsoft recommends it as an improved version of VLOOKUP.

What is the difference between COUNT, COUNTA and COUNTIF?

COUNT counts cells with numbers. COUNTA counts any cell that is not empty. COUNTIF counts only the cells that meet a condition you set.

What are advanced Excel skills?

Typically they include lookups with XLOOKUP or INDEX and MATCH, dynamic array functions (FILTER, UNIQUE, SORT), PivotTables, Power Query and dashboards. Master the 12 functions above first. Then follow our guide to learning advanced Excel fast.

Which Excel versions support these functions?

Eleven of the 12 work in every version of Excel. CONCAT needs Excel 2019 or later (or Microsoft 365); in older versions use the & operator. XLOOKUP, FILTER, UNIQUE, SORT and LET need Microsoft 365 or Excel 2021 and later. TEXTJOIN and IFS need Excel 2019 and later.

Subscribe to the ExcelChamp YouTube channel for more Excel tips and tutorials.

How to Center a Title in Excel (With and Without Merging)

To center a title in Excel, type it in the first cell, select the cells it should span, and either click Merge & Center (Home tab) or choose Center Across Selection in Format Cells. Both look the same on screen, but Center Across Selection keeps your cells separate, so sorting, filtering and copying still work. That is the method I recommend.

Not sure which one you need? Use this quick guide, then jump to the section you want.

I want to center… Best method Shortcut (Windows)
A title across several columns (no merging) Center Across Selection Ctrl + 1, then Alignment tab
A title across several columns (merged) Merge & Center Alt, H, M, C
Text inside a single cell Center button Alt, H, A, C
Text up-and-down in a tall cell Middle Align Alt, H, A, M
A chart title Chart Title > Above Chart –
The whole sheet on a printed page Page Setup > Margins > Center on page –
Text in a printed header or footer Custom Header, Center section –

Steps are for Microsoft 365 and Excel 2016 or later. Older versions have the same commands, with small differences in tab names.

Title centered across a table in Excel

Merge & Center vs Center Across Selection

Merge & Center joins the selected cells into one big cell. Center Across Selection only changes how the text is displayed. The cells underneath stay separate.

Merge & Center Center Across Selection
Cells merged? Yes No
Contents of the other cells Deleted Kept (but cells to the right of the title must be empty for it to centre)
Sort and filter Problems with merged cells Works normally
Inside an Excel Table Button is greyed out Use it on a row above the Table
Where is it Home tab button Format Cells dialog

My rule: use Center Across Selection for anything you will sort, filter, copy or reuse. Use Merge & Center only for a finished report or dashboard that nobody will sort.

Method 1: Center Across Selection (recommended)

This centers your title over several columns without merging a single cell.

  1. Type the title in the leftmost cell, for example A1.
  2. Select the cells the title should span, for example A1:F1. The cells to the right of the title must be empty.
  3. Press Ctrl + 1 (Cmd + 1 on Mac) to open Format Cells. Or right-click and choose Format Cells.
  4. Stay on the Alignment tab. Under Horizontal, change General to Center Across Selection.
  5. Click OK.

Center Across Selection in the Format Cells dialog in Excel

Click the title and look at the formula bar. The text lives in A1 only, and B1 to F1 are still ordinary cells. That is why sorting and filtering keep working.

Tip: If the title does not centre, check that the cells to its right are truly empty. Even a stray space stops it.

Method 2: Merge & Center

This is the quickest method, and fine for a one-off report.

  1. Type the title in the first cell of the range.
  2. Select the cells to span, for example A1:F1.
  3. On the Home tab, in the Alignment group, click Merge & Center. Keyboard: Alt, H, M, C.

Merge and Center button on the Home tab in Excel

Excel keeps only the text in the top-left cell. Anything in the other selected cells is deleted, so copy it elsewhere first. Click the small arrow beside the button if you want Merge Across or Merge Cells (merge without centering).

If you select several rows, centered text sits in the bottom row of the merged cell. Fix that with Middle Align, covered next.

How to Center Text in a Single Cell

For one cell, no merging is needed. Select the cell and click Center in the Alignment group on the Home tab. Keyboard: Alt, H, A, C on Windows, or Cmd + E on Mac.

The same group has Left and Right alignment buttons if you change your mind. To center a whole row of column headings, select the header cells and click Center once.

How to Center a Title Vertically (Middle Align)

In a tall row, text sits at the bottom by default. Click Middle Align (Alignment group, Home tab) to put it halfway up the cell. Keyboard: Alt, H, A, M. Combine it with Center and the title sits exactly in the middle, horizontally and vertically.

Middle Align button in Excel

How to Center a Title Over a Table

A title above a table is just a cell above the table’s first column. Use Center Across Selection on the row above the table, spanning the same columns as the table.

Do not merge cells inside an Excel Table. The Merge & Center button turns grey when the selection is part of a Table. Keep the title in a row above the Table instead, and your filter buttons and sorting stay intact. Want to sort a list safely? See Re-Sorting a List or Table in Excel.

How to Unmerge Cells in Excel

  1. Select the merged cell.
  2. On the Home tab, click Merge & Center again (it works as a toggle), or open its arrow and choose Unmerge Cells.

The text drops back into the left cell. To switch to the cleaner method, select the same range again and apply Center Across Selection as in Method 1. Pressing Ctrl + Z straight after merging also undoes it.

To find every merged cell on a sheet, press Ctrl + F, click Options > Format, tick Merge cells on the Alignment tab, then click Find All.

How to Center a Chart Title in Excel

New charts usually place the title in the top centre automatically. If yours is missing or has moved:

  1. Click the chart.
  2. Click the green + (Chart Elements) button at the top right, or go to Chart Design > Add Chart Element.
  3. Tick Chart Title, then pick Above Chart. The title sits centered above the plot area.
  4. Click the title and type your own text.

Centered Overlay in the same menu places the title over the chart instead of above it. If you dragged the title off-centre, choosing Above Chart again snaps it back.

Adding a chart title above the chart in Excel

Excel chart with the title centered

Want the title to update by itself? Read Dynamic Chart Titles in Excel. More chart polish tips are in Creating Beautiful Excel Charts for Business Presentations.

How to Center a Sheet on the Printed Page

Your title may look centered on screen but print off to the left. To center the whole printout:

  1. Go to the Page Layout tab.
  2. Click the small arrow (dialog launcher) in the Page Setup group.
  3. Open the Margins tab.
  4. Under Center on page, tick Horizontally, Vertically, or both.

Check it in Print Preview (Ctrl + P).

How to Center Text in a Header or Footer (Print)

Every printed header and footer has three boxes: Left, Center and Right. “Center header section” simply means the middle box.

  1. Go to Insert > Header & Footer. Excel switches to Page Layout view.
  2. Click the center box at the top (header) or bottom (footer) of the page.
  3. Type your text, or use the Header & Footer tab to insert the sheet name, file name, date or page number.

Prefer a dialog? Go to Page Layout, open the Page Setup launcher, choose the Header/Footer tab, then Custom Header or Custom Footer. Type in the Center section box. This route also lets you apply the same header to several sheets at once.

Custom header with file name in the center section in Excel

For example: file name in the left section, today’s date in the centre, page number in the right section. Print Preview shows the result.

Note: set up headers and footers in the Excel desktop app. Microsoft’s instructions for them cover the desktop versions.

Excel for Windows, Mac and the Web

  • Windows: everything above applies. Shortcuts: Ctrl + 1, Alt, H, A, C.
  • Mac: same buttons on the Home tab. Format Cells is Cmd + 1, and Center is Cmd + E. The Alt key sequences are Windows only.
  • Excel for the web: Merge & Center is on the Home tab. If you cannot find Center Across Selection in the web version, open the file in the desktop app to apply it.

Want the full list of keys? See Microsoft Excel Shortcuts.

Troubleshooting

Merge & Center is greyed out

You are either editing a cell (press Enter or Esc first), or the cells are inside an Excel Table. Convert the Table to a range (Table Design > Convert to Range), or put the title in a row above the Table.

I cannot sort my data

Merged cells block sorting. Unmerge them, then use Center Across Selection instead. Also see How to Freeze Top Rows and Columns to keep headings visible while you scroll.

Center Across Selection does nothing

Make sure the title is in the leftmost cell and the cells to its right are empty. A space or a formula returning “” can also interfere.

My text disappeared after merging

Excel keeps only the top-left cell. Press Ctrl + Z immediately to get it back.

Want to format Excel reports like a pro? Our Excel for Beginners course covers formatting, alignment and the shortcuts that save hours.

Frequently Asked Questions

How do I center a title in Excel?

Type the title in the first cell, select the cells it should span, then use Merge & Center on the Home tab or Center Across Selection in Format Cells. Center Across Selection is better because it does not merge cells.

What is the best way to center a title over the width of a section of a financial model?

Use Center Across Selection from the Format Cells menu (Alignment tab, Horizontal). It centers the title across the section without merging cells, so sorting, filtering and copying still work. The custom header’s center section is for printed pages, and Merge & Center merges the cells.

How do I center a header in Excel?

It depends on what you mean. For column headings, select the cells and click Center on the Home tab. For text printed at the top of every page, use Insert > Header & Footer and click the center box.

Where is the center header section in Excel?

It is the middle of the three boxes (Left, Center, Right) in Page Layout view and in the Custom Header dialog. Find it under Insert > Header & Footer or Page Layout > Page Setup > Header/Footer tab.

What is the shortcut to center text in Excel?

Press Alt, H, A, C in Windows to center the contents of the selected cells. On Mac, press Cmd + E. Merge & Center is Alt, H, M, C.

Why is Merge & Center greyed out?

Either you are still editing a cell, or the cells are part of an Excel Table. Press Esc, or convert the Table to a range first.

How do I center a title across columns without merging?

Select the cells, press Ctrl + 1, go to the Alignment tab and set Horizontal to Center Across Selection. The title is centered but each cell stays separate.

How do I center text vertically in Excel?

Select the cells and click Middle Align on the Home tab (Alt, H, A, M). Combine with Center to put text in the exact middle of the cell.

How do I center a chart title in Excel?

Click the chart, open Chart Elements (the + button), tick Chart Title and choose Above Chart. It is placed at the top centre of the chart.

Cheers,
Vinai Prakash
Founder & Master Trainer, ExcelChamp.net

Find Age in Years within Microsoft Excel [Video Tutorial]

Wondering How To Find the Age in Years from Date of Birth, in Microsoft Excel?

See multiple ways to calculate Age in Excel from any date of birth.

This simple, step-by-step tutorial on finding the age in Excel from date of birth or any other date, work on Microsoft Office 365, Microsoft Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007 & Excel 2003 too.

We cover Microsoft Excel Functions & Formulas that allow you to calculate the following things in Excel:

  1. Find the age in Years
  2. Find the Age in Months
  3. Find the Age in Days
  4. Finding the exact age in Years, Months & Days.
  5. Combining Years & Months to create a Text String the way we want.

Here’s how to calculate the number of years since the date of birth

Not only the years we can also calculate the months. I will show you multiple techniques to calculate the age in years, months & days.

If you want a whole number or you want the age as a fraction, there are so many ways to do it.

What we want to calculate is the age in years –  something like Age is 55 years. Or Age is 55.56 years.

Before we start i want to highlight to you that the date of birth that you are using should be a date field so you can select it and make sure the formatting is not General or text, but it should be set as a short date or any kind of date.

To calculate the years,  the formula is extremely simple. We will be using the DATEDIF function of Excel.
=DATEDIF(DateofBirth, TODAY(), “Y”)

Similarly, we can calculate the age in months too.

=DATEDIF(DateofBirth, TODAY(), “M”)

This will result in the number of months from the date of birth to today’s date. You might see a huge number like 666 here.

But you may not want this.  Perhaps we only want how many months after the 55 whole years have elapsed.

In this case,  we modify the formula from only “M” to “YM”

=DATEDIF(DateofBirth, TODAY(), “YM”)

YM means it is only the months after the completed years. By doing this we can see that only six months have elapsed after 55 years.

Finally, we only need the days that have elapsed after the completed months in the age.

=DATEDIF(DateofBirth, TODAY(), “D”)

This will tell you that 20,000 days have passed from the date of birth, but, of course, we don’t want this.

So you change D to MD. The “MD” tells Excel to calculate how many days after the month have elapsed. 

As you can see, we have the age calculated in different cells – the age is 55 years 6 months and 9 days exactly till today.

If you wish to see a complete combined date, you can use the CONCAT function to combine multiple formulas, or use the & to combine text as well.

As an example, we can write

=CONCAT(DATEDIF(dateofbirth,TODAY(),”Y”),” Years, “,DATEDIF(dateofbirth,TODAY(),”YM”),” Months & “,DATEDIF(dateofbirth,TODAY(),”MD”),” Days”)

For a DateofBirth date of 6-December-1966, it generates, 55 Years, 6 Months & 28 Days.

Hope you find this DATEDIF function quite handy for such use. Do give it a try and let us know how you use it.

Cheers,
Vinai

Recommended Reading for Next Steps:

  1. Using Date & Time Functions in Excel
  2. Difference Between 2 Dates, Without the Weekends

Master These Excel Lookup Functions To Save Time

One of the most popular Excel Lookup functions is VLOOKUP. Another Excel function to check out is the HLOOKUP function, which can do a horizontal lookup.

The newly added XLOOKUP is becoming very popular too. (The XLOOKUP function is currently only available in Office 365 versions).

For the advanced & power users of Excel, the mastery of Excel lookup functions like INDEX, MATCH & OFFSET can be considered vital. These functions are considered the “advanced” lookup functions in Excel.

With the help of these functions, you will be able to analyze data quickly. To learn more, you should enrol in the data analysis and interpretation training class. 

But with the introduction of XLOOKUP, some of the jugglery created by mixing INDEX & MATCH combination is no longer required.

VLOOKUP Function of Excel

The most MUST HAVE Function ever. Even Excel gurus can’t live without it. I polled a group of Excel experts recently, asking if Excel’s VLOOKUP was overrated. I got a severe backlash for even mentioning it.

Almost everyone said that it is their GO TO function, an absolute must-have and that Excel won’t be that useable if this VLOOKUP function was taken away from Excel!

Most people swear by their VLOOKUP functions. It is their GO TO function when they want to lookup value of any type.

According to legend, VLOOKUP mastery is what separates the Pro Excel users from the Amateurs!

Vlookup is akin to using a dictionary. You know the word, and you want to find out the meaning. This dictionary is the range of cells that contain the lookup up value, and its associated value. The V in VLOOKUP stands for the dictionary data array being a vertical dictionary. So for a vertical lookup you must use VLOOKUP function only.

=VLOOKUP(word, dictionary, column number of meaning, exact_match_ype)

In the VLOOKUP formula, the first column in the dictionary must contain the lookup up value, and the first row should be of the data. You should not include the headings in the dictionary table. The difficulty most people have with VLOOKUP is the last flag – the logical value of TRUE or FALSE (You can use 1 for True and 0 to indicate the False flag).

Once a matching value is found out, you will be able to get the return value based on the search. The error value of N/A will be generated if there is no exact match until the last row or the last column of the array.

The mystery is created because to use VLOOKUP for an exact match, you have to specify the last optional flag, and set its value to a FALSE or a 0. By default, it is set to 1, which is useful for an approximate match type only. So for an exact match of a specific value, the last parameter is not really optional… it is mandatory.

Practical Examples of VLOOKUP:

= VLOOKUP(50, age_income, 2) will find the income from the second column of the age_income range for the age value of 50. Note that this is set as an approximate match lookup, as the last optional value is not specified.

=VLOOKUP(A5, $K$10:$L$100, 2, FALSE)

In this VLOOKUP example, we are looking for a piece of information from the column of data in the range $K$10 to $L$100. The search value is in cell A5, and the particular value of interest is in the lookup array that is set as an absolute reference.

The above example uses the reference functions that will generate an Exact match. If the correct value is not found, an error value of N/A will be received.

There are two major shortcomings in using the VLookup function of Excel.

  • First of all, the VLOOKUP is really a slow function. It is obvious when you do a lookup on a large list of 100,000 values or more.
  • Secondly, VLOOKUP can only look up a corresponding value from the columns on the right of the looked-up value. It can’t look to the left!

Make sure you master this Excel function really well.

HLOOKUP Function in Excel

An often forgotten cousin of the VLOOKUP formula, this Horizontal Lookup and Reference function in Excel works in a similar way too. The only difference is that in this case, a lookup dictionary is a horizontal dictionary of columns, denoted by the H.

HLOOKUP is most used in range lookups, rather than exact matches, as columns are not the best suited for exact values, because of their limit of only16,000 columns. Whereas a list can grow vertically to over a million records easily.

In the following formula, this lookup function searches for the closest match, especially when we are not searching for an exact match, but an approximate match.

The dictionary is the table array and it is recommended that we use the absolute reference to lock the cells from moving.

=HLOOKUP(A5, $G$2:$K$100, 2)

Here the HLOOKUP will search for the exact or the next smallest value in the lookup table source data range of $G$2 to $K$100, and return the second row. If you want the third row, you can change the 2 into a 3.

Both VLOOKUP & HLOOKUP return single-cell values from a single row or a single column.

XLOOKUP Function in Excel

Did you know that new functions are added to Excel quite frequently, and these are extremely useful functions making approximate matches as well as exact matches?

Finally, after years of backlash at Microsoft for creating the mess with the Match Type (True and False) in VLOOKUP, they got rid of it completely in the Excel XLOOKUP function.

By default, XLOOKUP is set to do an exact match.

XLOOKUP requires a deeper understanding of the various scenarios it can handle. I’d recommend a dedicated video tutorial on XLOOKUP by Excel MVP Chandoo to learn how to use XLOOKUP in Excel.

This new XLOOKUP function of Excel is only available from Microsoft Office 365 users. It does not work on Excel 2016 or Excel 2019 versions.

Good knowledge of these lookup functions can help you to prepare the data in advance before you begin to analyze or summarize data with Excel.

With so many better functions, I have now stopped using VLOOKUP. There’s a new feature in Power Query in Excel, which really negates the use of vlookup function in Excel.

Using INDEX Function in Excel

If you know the row number, you can find the value on that row or column cell directly. INDEX can be used as an Array function also. Paired with MATCH, you can find any value on any row or column in a 2-dimensional array.

How To Use Excel MATCH Function

When you want to find an exact match in an array and return the row number in the array, MATCH comes to your rescue.

It is one up on VLOOKUP, which requires you to know the column you want to return. MATCH can find a match for a value that is lower, exactly equal or higher than the specified value.

=MATCH(value, range_Lookup_Cells, FALSE)

This simple example MATCH function will look for the value in the range_Lookup_Cells, and return the row of the matched value exactly.

Index and Match can work on a single row or a single column of data too. These 2 lookup functions of Excel are the exact opposite of each other.

The index finds the value on a particular row, and Match finds the row or column number where the match happens to be found in the data range.

Both Index and Match can also run as an array form of the Excel Lookup Function.

Paired with INDEX, an INDEX & MATCH Function can manage to look up on the left or the right of any array of cells.

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
!

Master the OFFSET Function within Excel

To navigate your way in a two-dimensional array of rows and columns, you can use the OFFSET function in Excel. It can traverse any number of Rows or Columns, and get you the value.

How to use the offset function in Excel:

=OFFSET(Starting Cell, Row to move up or down, Columns to move left or right, Number of rows required to be returned, number of columns required to be returned)

I generally use OFFSET more than INDEX and MATCH combinations. Using one super-powerful OFFSET function is more straightforward.

Thee

Once you start using Offset in Excel, you wouldn’t want to use other lookup functions of Excel.

When Do I Use the INDIRECT Function of Excel?

The Excel INDIRECT function returns the reference specified by a string text. Any References are immediately evaluated to display their contents.

You can Use the INDIRECT function when you want to change the reference to a cell within a formula, without changing the formula itself.

=INDIRECT(A3)

The above Indirect function will check what is in cell A3. And A3 will have the cell reference to another cell. So if A3 contains B35, Excel will then read the value in cell B35.

Thus, we can get the value of the reference in cell A3. The reference is to cell B3, which may contain the value 45.

The INDIRECT can be very useful in creating custom management dashboards and reports.

What does the FORMULATEXT Function of Excel Do?

Displays the text of another formula. This formula helps to see all formulas next to their values and can be useful to spot mistakes and issues with formulas.

=FORMULATEXT(A3) will provide you with the formula in cell A3 as a Text Value.

This FormulaText function is useful to see the formula without having to go into Editing mode.

View this article for more information on how to get the Formula of another cell in Excel.

Begin Using ROWS Function of Excel

Displays the row number of a reference cell.

=ROWS(A1:B4)

The above function will return a value of 4. This is because there are 4 Rows in the given range.

Use the COLS Function in Microsoft Excel?

Displays the column number of a reference cell. As evident in the following syntax, COLS function is useful to count the columns in a range.

This can be useful, when combined with INDIRECT and OFFSET, the function begins to help in generating a dynamic range.

=COLS(A1:B4)

Will return a 2. This is because there are 2 Columns in the given range: A & B.

Use the TRANSPOSE Function in Excel like a Pro

Converts rows into columns and columns into rows. Just like the Transpose feature in Paste Special, but done programmatically.

So if you use TRANSPOSE(A1:D3), you have selected 4 columns and 3 rows.

After the Transpose is completed, you will get an array reference of 3 Columns, and 4 Rows. The horizontal table would have flipped and will be visible vertically.

So the next time you have a list of products that you want to flip from rows to columns, you can use the Transpose function.

Pretty nice use of hanging values in rows into columns.

When Do I Use the UNIQUE Function of Excel?

The UNIQUE function of Excel generates a list of unique values that automatically spill down. An array function can be used to create data validation lists too.

Available from Microsoft Office 365 onwards. This UNIQUE function is not available in Excel 2016 or Excel 2019.

=UNIQUE(Data_Range)

Learning the Lookup Functions in Excel Quickly & Easily

As you can see, there are a lot of LOOKUP functions in Excel, and learning and mastering them takes time. But once you do master them, you can do wonders with your Excel skills.

It is worth the effort to learn the Excel Lookup Functions. Call Intellisoft at +65-6296-2995 for Excel 365 Classroom Training that covers the key Lookup functions of Excel.

You will definitely enjoy it!

Cheers,

Vinai

Founder of ExcelChamp. Master Trainer at Intellisoft Systems in Singapore.

Need Tips on Pivot Tables, Data Analysis or Creating Better Charts?

Do check out these resources

And if you want to learn Advanced Excel fast, then check out our detailed guide.

Articles Written By Vinai.

Vinai is passionate about maximizing Excel to improve everyday productivity. He conducts online Excel workshops as well as classroom workshops in Singapore, Australia, Middle East. If you would like to engage him to train your staff in maximising Excel, do contact us.

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!