May 9, 2021

# 10+ excel data analysis functions you need to know

If you’ve ever used Excel, then you’ve probably experienced the agony of choosing an incorrect formula to analyze a data set. Maybe you worked on it for hours, finally giving up because the data output was wrong or, the function was too complicated, and it seemed simpler to count the data yourself manually. If that sounds like you, then this Data Analysis in Excel top 10+ is for you.

## Generating inference from Data

1. Pivot Table: Whenever you are working with company data, you seek answers for questions like “How much revenue is contributed by branches of North region?” or “What was the average number of customers for product A?” and many others.

Excel’s PivotTable helps you to answer these questions effortlessly. A pivot table is a summary table that lets you count, average, sum, and perform other calculations according to the reference feature you have selected i.e.  It converts a data table to an inference table which helps us to make decisions. Look at the below snapshot:

Above, you can see that table on the left has sales detail against each customer with the region and product mapping. In the table to the right, we have summarized the information at region level which now helps us to generate an inference that the South region has the highest sales.

Methods to create Pivot table:
Step-1: Click somewhere in the list of data. Choose the Insert tab, and click PivotTable. Excel will automatically select the area containing data, including the headings. If it does not select the area correctly, drag over the area to select it manually. Placing the PivotTable on a new sheet is best, so click New Worksheet for the location and then click OK

Step-2: Now, you can see the PivotTable Field List panel, which contains the fields from your list; all you need to do is to arrange them in the boxes at the foot of the panel. Once you have done that, the diagram on the left becomes your PivotTable.

Above, you can see that we have arranged “Region” in row, “Product id” in column and sum of “Premium” is taken as value. Now you are ready with pivot table which shows Region and Product wise sum of premium. You can also use count, average, min, max and other summary metrics.

READ:  Power Query: 10 Top Tips

2. Creating Charts: Building a chart/ graph in excel requires nothing more than selecting the range of data you wish to chart and press F11. This will create an Excel chart in default chart style but you can change it by selecting different chart style. If you prefer the chart to be on the same worksheet as the data, instead of pressing F11, press ALT + F1.

Of course, in either case, once you have created the chart, you can customize to your particular needs to communicate your desired message.

## Commonly used functions

### 1. IF()

I find it one of the most useful functions in excel. It lets you use conditional formulas that calculate one way when a certain thing is true and another way when false. For example, you want to mark each sales as “High” and “Low”. If sales are greater than or equals to \$5000 then “High” else “Low”.

```Syntax: =IF(condition, True Statement, False Statement)

```

### 2. CONCATENATE()

The Excel CONCATENATE function concatenates (joins) join up to 30 text items together and returns the result as text. The CONCAT function replaces CONCATENATE in newer versions of Excel.

Syntax=CONCATENATE(text1, [text2], …)

Above problem can be solved using formula, =concatenate(B3, C3) and copy it.

Tip: I prefer using the “&” symbol, because it is shorter than typing a full “concatenate” formula, and does the exact same thing. The formula can be written as  “= B3&C3”.

### 3. Vlookup():

Vlookup excel function is an inbuilt referencing function which is used to find out a certain data from a group of data or range which is also known as table array, vlookup function uses total of four arguments, the first argument is the reference cell and the second argument is the table array, the third argument is the column number where our data is and fourth the matching criteria.

READ:  15 Tips to Make you an Excel Formatting Pro

`Syntax: =VLOOKUP (value, table, col_index, [range_lookup])`

For the above problem, we can write the formula in cell “F4” as =VLOOKUP(B4, \$H\$4:\$L\$15, 5, 0) and this will return the city name for all the Customer id 1 and post that copy this formula for all Customer ids.

Tip: Do not forget to lock the range of the second table using a “\$” sign – a common error when copying this formula down. This is known as relative referencing.

### 4. LEN()

The LEN function in Excel counts characters in a string. I mainly use it when I need to extract text from a string. The Excel LEN function comes in handy when the number of characters in a string is indefinite.

```Syntax: =LEN(text)
```

Example: =Len(B3) = 23

### 5. TRIM()

This is a handy function used to clean text that has leading and trailing white space. Often when you get a dump of data from a database the text you’re dealing with is padded with blanks. And if you don’t deal with them, they are also treated as unique entries in a list, which is certainly not helpful.

`Syntax: =Trim(Text)`

### 6. LOWER(), UPPER() and PROPER()

–These three functions help to change the text to lower, upper, and sentence case respectively (First letter of each word capital).

`Syntax: =Upper(Text)/ Lower(Text) / Proper(Text)`

In a data analysis project, these are helpful in converting classes of a different case to a single case else these are considered as different classes of the given feature. Look at the below snapshot, column A has five classes (labels) whereas Column B has only two because we have converted the content to lower case.

## Data Cleaning

1. Remove duplicate values: Excel has inbuilt feature to remove duplicate values from a table. It removes the duplicate values from given table based on selected columns i.e. if you have selected two columns then it searches for duplicate value having same combination of both columns data.

Above, you can see that A001 and A002 have duplicate value but if we select both columns “ID” and “Name” then we have only one duplicate value (A002, 2).
Follow the these steps to remove duplicate values: Select data –> Go to Data ribbon –> Remove Duplicates

READ:  95+ Useful Excel Macro Examples for VBA Beginners (Ready-to-use)

2. Text to Columns: Let’s say you have data stored in the column as shown in below snapshot.

Above, you can see that values are separated by semicolon “;”. Now to split these values in a different column, I will recommend to use the “Text to Columns” feature in excel. Follow the below steps to convert it to different columns:

1. Select the range A1:A6

2. Go to “Data” ribbon –> “Text to Columns”

Above, we have two options “Delimited” and “Fixed width”. I have selected delimited because the values are separated by a delimiter(;). If we would be interested to split data based on the width such as the first four character to the first column, 5 to 10th character to the second column, then we would choose Fixed width.

3. Click on Next –>Mark checkbox on for “Semicolon” then Next and finish.

## Essential keyboard shortcuts

Keyboard shortcuts are the best way to navigate cells or enter formulas more quickly. We’ve listed our favorites below.

1. Ctrl +[Down|Up Arrow]: Moves to the top or bottom cell of the current column and combination of Ctrl with Left|Right Arrow key, moves to the cell furthest left or right in the current row
2. Ctrl + Shift + Down/Up Arrow: Selects all the cells above or below the current cell
3. Ctrl+ Home: Navigates to cell A1
4. Ctrl+End: Navigates to the last cell that contains data
5. Alt+F1: Creates a chart based on selected data set.
6. Ctrl+Shift+L: Activate auto filter to data table
7. Alt+Down Arrow: To open the drop-down menu of auto filter
8. Alt+D+S: To sort the data set
9. Ctrl+O: Open a new workbook
10. Ctrl+N: Create a new workbook
11. F4: Select the range and press F4 key, it will change the reference to absolute, mixed and relative.

Note: This isn’t an exhaustive list. Feel free to share your favorite keyboard shortcuts in Excel in the comments section below. Literally, I do 80% of excel tasks using shortcuts.

#### Excel

View all posts by Excel →