Introduction to Excel For DATA ANALYSTS BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts What is Excel? It is a spreadsheet tool developed by Microsoft. Excel organizes data in columns and rows and allows you to do mathematical functions. It runs on Windows, macOS, Android, and iOS. The first version of Excel was released in 1985 and has gone through several changes over the years. However, the main functionality mostly remains the same. Excel is typically used for: Analysis Data entry Data management Accounting Budgeting Data Analysis Visuals and graphs Programming Financial modeling And much more! Why Use Excel? Most popular spreadsheet tool in the world Easy to learn You can do more advanced things, as you get better Works for both Personal and Professional Use Huge Community support Continuously supported by Microsoft’s updates Templates and Frameworks can be reused by yourself and others, lowering creation costs. #excelwithumaer Excel for Data Analysts Overview This chapter is about giving you an overview of Excel. Excel's structure is made of two pieces, the Ribbon and the Sheet. Have a look at the picture below. The Ribbon is marked with a red rectangle and the Sheet is marked with a yellow rectangle: First, let’s start with explaining the Ribbon. The Ribbon explained The Ribbon provides shortcuts to Excel commands. A command is an action that allows you to make something happen. This can for example be to: insert a table, change the font size, or to change the color of a cell. The Ribbon may look crowded and hard to understand at first. Don't be scared, It will become easier to navigate and use as you learn more. Most of the time we tend to use the same functionalities over again. The Ribbon is made up of the App launcher, Tabs, Groups, and Commands. In this section, I explain the different parts of the Ribbon. #excelwithumaer Excel for Data Analysts App launcher The App launcher icon has nine dots and is called the Office 365 navigation bar. It allows you to access the different parts of the Office 365 suite, such as Word, PowerPoint, and Outlook. App launcher can be used to switch seamlessly between Office 365 applications. Tabs The tab is a menu with sub-divisions sorted into groups. The tabs allow users to quickly navigate between options of menus that display different groups of functionality. Groups The groups are sets of related commands. The groups are separated by the thin vertical line break. Commands The commands are the buttons that you use to do actions. Now, let's have a look at the Sheet. Soon you will be able to understand the relationship between the Ribbon and the Sheet, and you can make things happen. #excelwithumaer Excel for Data Analysts The Sheet explained The Sheet is a set of rows and columns. It forms the same pattern as we have in math exercise books, the rectangle boxes formed by the pattern are called cells. Values can be typed into cells. Values can be both numbers and letters: Each cell has its unique reference, which is its coordinates, this is where the columns and rows intersect. Let's break this up and explain by an example Have a look at the picture below. Hello world was typed in cell C4. The reference can be found by clicking on the relevant cell and seeing the reference in the Name Box to the left, which tells you that the cell's reference is C4. #excelwithumaer Excel for Data Analysts Another way to find the reference is to first find the column, in this case C, then map that towards the row, in this case 4, which gives us the reference of C4. Note: The reference of the cell is its coordinates. For example, C4 has the coordinates of column C and row 4. You find the cell at the intersection of the two. The letter is always the column and the number is always the row. Multiple Sheets You start with one Sheet by default when you create a new workbook. You can have many sheets in a workbook. New sheets can be added and removed. Sheets can be named to make it easier to work with data sets. Are you up for the challenge? Let's create two new sheets and give them useful names. First, click the plus icon, shown in the picture below, and create two new sheets: #excelwithumaer Excel for Data Analysts Tip: You can use the hotkey Shift + F11 to create new sheets. Try it! Second, right click with your mouse on the relevant sheet and click rename: Third, enter useful names for the three sheets: #excelwithumaer Excel for Data Analysts In this example, we used the names Data Visualization, Data Structure, and Raw Data. This is a typical structure when you are working with data. Chapter Summary The workbook has two main components: the Ribbon and the Sheet. The Ribbon is used to navigate and access commands. The Sheet is made up of columns and rows, which make cells. Each cell has its unique reference. You can add new sheets to your workbook and name them. In the next chapters, you will learn more about the sheet, formulas, ranges and functions. #excelwithumaer Excel For Data Analysts Excel Syntax Syntax A formula in Excel is used to do mathematical calculations. Formulas always start with the equal sign = typed in the cell, followed by your calculation. Note: You claim the cell by selecting it and typing the equal sign (=) Creating formulas, step by step Select a cell Type the equal sign (=) Select a cell or type value Enter an arithmetic operator Select another cell or type value Press enter For example, =1+1 is the formula to calculate 1+1=2 Note: The value of a cell is communicated by reference(value) for example A1(2) Using Formulas with Cells You can type values into cells and use them in your formulas. Let’s type some dummy values to get started. Double-click the cells to type values into them. Go ahead and type: A1(309) A2(320) B1(39) B2(35) #excelwithumaer Excel For Data Analysts Compare with the picture shown below: Note: Type values by selecting a cell, claim it by entering the equal sign (=) and then type your value. For example =309. Here is how to do it, step by step. 1. Select the cell C1 2. Type the equal sign (=) 3. Left click on A1, the cell that has the (309) value 4. Type the minus sign (-) 5. Left click on B2, the cell that has the (35) value 6. Hit enter Tip: The formula can be typed directly without clicking the cells. The typed formula would be the same as the value in C1 (=A1-B2). #excelwithumaer Excel For Data Analysts The result after hitting the enter button is C1(274) #excelwithumaer Excel For Data Analysts Another Example Let's try one more example, this time let's make the formula =A2-B1. Here is how to do it, step by step. 1. Select the cell C2 2. Type the equal sign (=) 3. Left click A2, the cell that has the (320) value 4. Type the minus sign (-) 5. Left click B1, the cell that has the (39) value 6. Hit the enter button #excelwithumaer Excel For Data Analysts You get the result C2(281). Note: You can make formulas with all four arithmetic operations, such as addition (+), subtraction (-), multiplication (*) and division (/). Here are some examples: =2+4 gives you 6 =4-2 gives you 2 =2*4 gives you 8 =2/4 gives you 0.5 #excelwithumaer Excel For Data Analysts Excel Ranges Ranges Range is an important part of Excel because it allows you to work with selections of cells. There are four different operations for selection; Selecting a cell Selecting multiple cells Selecting a column Selecting a row Before having a look at the different operations for selection, we will introduce the Name Box. The Name Box The Name Box shows you the reference of which cell or range you have selected. It can also be used to select cells or ranges by typing their values. #excelwithumaer Excel For Data Analysts You will learn more about the Name Box later in this chapter. Selecting a Cell Cells are selected by clicking them with the left mouse button or by navigating to them with the keyboard arrows. It is easiest to use the mouse to select cells. To select cell A1, click on it: Selecting Multiple Cells More than one cell can be selected by pressing and holding down CTRL or Command and left clicking the cells. Once finished with selecting, you can let go of CTRL or Command. Let’s try an example: Select the cells A1, A7, C1, C7 and B4. #excelwithumaer Excel For Data Analysts Did it look like the picture below? Selecting a Column Columns are selected by left clicking it. This will select all cells in the sheet related to the column. To select column A, click on the letter A in the column bar: #excelwithumaer Excel For Data Analysts Selecting a Row Rows are selected by left clicking it. This will select all the cells in the sheet related to that row. To select row 1, click on its number in the row bar: Selecting the Entire Sheet The entire spreadsheet can be selected by clicking the triangle in the top-left corner of the spreadsheet: #excelwithumaer Excel For Data Analysts Now, the whole spreadsheet is selected: Note: You can also select the entire spreadsheet by pressing Ctrl+A for Windows, or Cmd+A for MacOS. Selection of Ranges Selection of cell ranges has many use areas and it is one of the most important concepts of Excel. Do not think too much about how it is used with values. You will learn about this in a later chapter. For now let's focus on how to select ranges. There are two ways to select a range of cells 1. Name Box 2. Drag to mark a range. The easiest way is drag and mark. Let's keep it simple and start there. How to drag and mark a range, step-by-step: 1. Select a cell 2. Left click it and hold the mouse button down #excelwithumaer Excel For Data Analysts 3. Move your mouse pointer over the range that you want selected. The range that is marked will turn grey. 4. Let go of the mouse button when you have marked the range Let's have a look at an example for how to mark the range A1:E10. Note: You will learn about why the range is called A1:E10 after this example. Select cell A1: Press and hold A1 with the left mouse button. Move to the mouse pointer to mark the selection range. The grey area helps us to see the covered range. Let go of the left mouse button when you have marked the range A1:E10: #excelwithumaer Excel For Data Analysts You have successfully selected the range A1:E10. The second way to select a range is to enter the range values in the Name Box. The range is set by first entering the cell reference for the top left corner, then the bottom right corner. The range is made using those two as coordinates. That is why the cell range has the reference of two cells and the : in between. Top left corner reference : Right bottom corner reference The range shown in the picture has the value of A1:E10: The best way for now is to use the drag and mark method as it is easier and more visual. #excelwithumaer Excel For Data Analysts Excel Fill Filling Filling makes your life easier and is used to fill ranges with values so that you do not have to type manual entries. Filling can be used for: Copying Sequences Dates Functions (*) For now, do not think of functions. We will cover that in a later chapter. How To Fill Filling is done by selecting a cell, clicking the fill icon and selecting the range using drag and mark while holding the left mouse button down. The fill icon is found in the button right corner of the cell and has the icon of a small square. Once you hover over it your mouse pointer will change its icon to a thin cross. #excelwithumaer Excel For Data Analysts Click the fill icon and hold down the left mouse button, drag and mark the range that you want to cover. In this example, cell A1 was selected and the range A1:A10 was marked. Now that we have learned how to fill. Let's look into how to copy with the fill function. #excelwithumaer Excel For Data Analysts Fill Copies Filling can be used for copying. It can be used for both numbers and words. Let's have a look at numbers first. In this example we have typed the value A1(1): Filling the range A1:A10 creates ten copies of 1: The same principle goes for text. #excelwithumaer Excel For Data Analysts In this example we have typed A1(Hello World). Filling the range A1:A10 creates ten copies of "Hello World": Now you have learned how to fill and to use it for copying both numbers and words. Let's have a look at sequences. Fill Sequences Filling can be used to create sequences. A sequence is an order or a pattern. We can use the filling function to continue the order that has been set. Sequences can for example be used on numbers and dates. Let's start with learning how to count from 1 to 10. This is different from the last example because this time we do not want to copy, but to count from 1 to 10. Start with typing A1(1): #excelwithumaer Excel For Data Analysts First, we will show an example which does not work, then we will do a working one. Ready? Let’s type the value (1) into the cell A2, which is what we have in A1. Now we have the same values in both A1 and A2. Let's use the fill function from A1:A10 to see what happens. Remember to mark both values before you fill the range. #excelwithumaer Excel For Data Analysts What happened is that we got the same values as we did with copying. This is because the fill function assumes that we want to create copies as we had two of the same values in both the cells A1(1) and A2(1). Change the value of A2(1) to A2(2). We now have two different values in the cells A1(1) and A2(2). Now, fill A1:A10 again. Remember to mark both the values (holding down shift) before you fill the range: #excelwithumaer Excel For Data Analysts Congratulations! You have now counted from 1 to 10. The fill function understands the pattern typed in the cells and continues it for us. That is why it created copies when we had entered the value (1) in both cells, as it saw no pattern. When we entered (1) and (2) in the cells it was able to understand the pattern and that the next cell A3 should be (3). Let's create another sequence. Type A1(2) and A2(4): #excelwithumaer Excel For Data Analysts Now, fill A1:A10: It counts from 2 to 20 in the range A1:A10. This is because we created an order with A1(2) and A2(4). #excelwithumaer Excel For Data Analysts Then it fills the next cells, A3(6), A4(8), A5(10) and so on. The fill function understands the pattern and helps us continue it. Sequence of Dates The fill function can also be used to fill dates. Note: The date format depends on your regional language settings. For example 14.03.2023 vs. 3/14/2023. Test it by typing A1(29.07.2021): And fill the range A1:A10: #excelwithumaer Excel For Data Analysts The fill function has filled 10 days from A1(29.07.2021) to A10(07.08.2021). Note that it switched from July to August in cell A4. It knows the calendar and will count real dates. #excelwithumaer Excel For Data Analysts Combining Words and Letters Words and letters can also be combined. Type A1(Hello 1) and A2(Hello 2): Next, fill A1:A10 to see what happens: The result is that it counts from A1(Hello 1) to A10(Hello 10). Only the numbers have changed. It recognised the pattern of the numbers and continued it for us. Words and numbers can be combined, as long as you use a recognizable pattern for the numbers. #excelwithumaer Excel For Data Analysts Excel Double Click to Fill Double Click to Fill The fill function can be double clicked to complete formulas in a range: Note: For the double click to work it has to see a recognizable pattern. For example: by using headers, or with the formulas in the columns or rows next to the data. Double Click to Fill Example Let's use the Double click fill function to calculate the AttackB2:B20 + Defense C2:C20 for the Pokemons in the range D2:D20. 1. Select D2 2. Type = #excelwithumaer Excel For Data Analysts 3. Select B2 4. Type + 5. Select C2 6. Hit enter #excelwithumaer Excel For Data Analysts 7. Double click the fill function Way to go! The function understands the pattern and completes the calculation for D2:D20. Note that it stops when there is no more data to calculate, at row 20. #excelwithumaer Excel For Data Analysts A Non-Working Example Delete values in the range D1:D20 Enter the formula "=B2+C2" in E2 Note: There is no header for Columns D and E. There are blank cells in between. Double click the fill function. Waiting... #excelwithumaer Excel For Data Analysts The fill function is just loading without filling the rows. It is not understanding the pattern. Give it more clues. Add a header to see what happens. Enter "Atk+def" in E1 Double click the fill function. #excelwithumaer Excel For Data Analysts Loading... Still nothing... One more header. Enter "Random" in D1 Double click the fill function. Is the gap closed? #excelwithumaer Excel For Data Analysts There we go! The function recognised the pattern and filled in the formulas for each row. Adding headers helped the function to understand the relationship between the data. #excelwithumaer Excel For DATA ANALYSTS Day-4 BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Move Cells Moving Cells There are two ways to move cells: Drag and drop or by copy and paste. Drag and Drop Let's start by typing or copying some values that we can work with: Next, start by marking the area A1:B4: #excelwithumaer Excel for Data Analysts You can drag and drop the range by pressing and holding the left mouse button on the border. The mouse cursor will change to the move symbol when you hover over the border. Drag and drop it when you see the symbol. Move the range to B2:C5 as shown in the picture: Great! Now you have created more space, so that we have room for more data. Note: It is important to give context to the data, making the spreadsheet easy to understand. This can be done by adding text which explains the data. Let's go ahead and give the data more context. Type or copy the following values: #excelwithumaer Excel for Data Analysts Yes, that is right, we are looking at Pokémon’s! Giving context to the data is always helpful. Next, let’s see how we can move data by using cut and paste. Cut and Paste Ranges can be moved by cutting and pasting values from one place to another. Tip: You can cut using the hotkey CTRL+X and paste by CTRL+V. This saves you time. Mark the range A1:C5 Right-click the marked area, and click on the "Cut" command, which has scissors as its icon: #excelwithumaer Excel for Data Analysts Cutting makes the range white-grey with dotted borders. This indicates that the range is cutted and ready for pasting. Right click the paste destination B6 and left click the paste icon. #excelwithumaer Excel for Data Analysts You have successfully cut and pasted the range from A1:C5 to B6:D10. #excelwithumaer Excel for Data Analysts Copy and paste Copy and paste works in the same way as cut and paste. The difference is that it does not remove the original cells. Let's copy the cells back from B6:D10 to A1:C5. Tip: You can copy using the hotkey CTRL+C and paste by CTRL+V. This saves you time. Try it! Mark the range B6:D10. Right-click the marked area, and click on the "Copy" command which has two papers as its icon. Copying gives the range a dotted green border. This indicates that the range is copied and ready for pasting. #excelwithumaer Excel for Data Analysts Right click the paste destination A1 and left click the paste icon: #excelwithumaer Excel for Data Analysts The difference between cutting and copying, is that cutting removes the originals, while copying leaves the originals. Next, let's delete the original data and keep the data in the A1:C5 range. Delete Data Select the original cells and remove them by pressing the "Delete" button on the keyboard: #excelwithumaer Excel for Data Analysts Excel Add Cells Adding New Columns Columns can be added and deleted. You access the menu by right-clicking the column letter. New columns are added to the same place you clicked. Let's try to create a new column B. #excelwithumaer Excel for Data Analysts Right click on the column and select "Insert Columns": And a new column is created: #excelwithumaer Excel for Data Analysts Next, we need to get some Pokemon trainers in there. Type or copy the following data in the new column B: #excelwithumaer Excel for Data Analysts Adding New Rows Rows can also be added and deleted. You access the menu by right clicking the row number. New rows are added to the same place you clicked. Let's try to create a new row 4. #excelwithumaer Excel for Data Analysts We forgot to add Iva's Pokemon, Marowak. Let’s add his data to the new row 4, by typing or copying the following values: Excellent job! #excelwithumaer Excel for Data Analysts Excel Delete Cells Delete Cells Cells can be deleted by selecting them, and pressing the delete button. Note: The delete function will not delete the formatting of the cell, just the value inside of it. Let's have a look at three examples. Example 1 Pressing the delete button: Example 2 Pressing the delete button: #excelwithumaer Excel for Data Analysts Example 3 With formatting: Pressing the delete button: Note that it only deletes the value in the cells, and not the formatting (the color). Note: You will learn more about formatting, and how to style cells in a later posts. Excel Undo and Redo. Undo The Undo function lets you reverse an action. Undo is helpful if you regret an action and want to go back to how it was before. Examples of use Undo deleting a formula Undo adding a column Undo removing a row #excelwithumaer Excel for Data Analysts Note: You cannot Undo things that you do in the File Menu, such as deleting a sheet, saving a spreadsheet or changing the options. The thumb rule is that you can Undo things you do in your sheet. There are two ways to access the Undo command. 1) Pressing the Undo button in the Ribbon: 2) Using the keyboard shortcut CTRL + Z / Command + Z Let's have a look at an example: #excelwithumaer Excel for Data Analysts Note: It is recommended to practice using the keyboard shortcut. It saves you time! Redo The Redo function has the opposite effect as Undo, it reverses the Undo action. Redo is helpful if you regret using Undo. Note: The Redo command is only available if you have used Undo. There are two ways to access the Redo command. 1) Pressing the Redo button in the Ribbon: 2) Using the keyboard shortcut CTRL + Y / Command + Y Tip: Practice for yourself to get familiar with Undo and Redo. #excelwithumaer Excel For DATA ANALYSTS Day-5 BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Formulas Formulas A formula in Excel is used to do mathematical calculations. Formulas always start with the equal sign (=) typed in the cell, followed by your calculation. Formulas can be used for calculations such as: =1+1 =2*2 =4/2=2 It can also be used to calculate values using cells as input. Let's have a look at an example. Type or copy the following values: Now we want to do a calculation with those values. Step by step: 1. Select C1 and type (=) 2. Right click A1 #excelwithumaer Excel for Data Analysts 3. Type (+) 4. Right click A2 5. Press enter You got it! You have successfully calculated A1(2) + A2(4) = C1(6). Note: Using cells to make calculations is an important part of Excel and you will use this alot as you learn. #excelwithumaer Excel for Data Analysts Let’s change from addition to multiplication, by replacing the (+) with a (*). It should now be =A1*A2, press enter to see what happens. You got C1(8). Excel is great in this way. It allows you to add values to cells and make you do calculations on them. Now, try to change the multiplication (*) to subtraction (-) and dividing (/). Delete all values in the sheet after you have tried the different combinations. #excelwithumaer Excel for Data Analysts Let's add new data for the next example, where we will help the Pokemon trainers to count their Pokeballs. Type or copy the following values: The data explained: Column A: Pokemon Trainers Row 1: Types of Pokeballs Range B2:D4: Amount of Pokeballs, Great balls and Ultra balls Note: It is important to practice reading data to understand its context. In this example you should focus on the trainers and their Pokeballs, which have three different types: Pokeball, Great ball and Ultra ball. Let's help Iva to count her Pokeballs. You find Iva in A2(Iva). The values in row 2 B2(2), C2(3), D2(1) belong to her. Count the Pokeballs, step by step: 1. Select cell E2 and type (=) 2. Right click B2 3. Type (+) 4. Right click C2 5. Type (+) 6. Right click D2 #excelwithumaer Excel for Data Analysts 7. Hit enter Did you get the value E2(6)? Good job! You have helped Iva to count her Pokeballs. Now, let's help Liam and Adora with counting theirs. Do you remember the fill function that we learned about earlier? It can be used to continue calculations sidewards, downwards and upwards. Let's try it! Let’s use the fill function to continue the formula, step by step: 1. Select E2 2. Fill E2:E4 #excelwithumaer Excel for Data Analysts That is cool, right? The fill function continued the calculation that you used for Iva and was able to understand that you wanted to count the cells in the next rows as well. Now we have counted the Pokeballs for all three; Iva(6), Liam(12) and Adora(15). Let's see how many Pokeballs Iva, Liam and Adora have in total. The total is called SUM in Excel. There are two ways to calculate the SUM. Adding cells SUM function Excel has many pre-made functions available for you to use. The SUM function is one of the most used ones. You will learn more about functions in a later chapter. Let's try both approaches. Note: You can navigate to the cells with your keyboard arrows instead of right clicking them. Try it! Sum by adding cells, step by step: 1. Select cell E5, and type = 2. Left click E2 3. Type (+) #excelwithumaer Excel for Data Analysts 4. Left click E3 5. Type (+) 6. Left click E4 7. Hit enter The result is E5(33). Let's try the SUM function. Remember to delete the values that you currently have in E5. SUM function, step by step: 1. Type E5(=) 2. Write SUM 3. Double click SUM in the menu #excelwithumaer Excel for Data Analysts 4. Mark the range E2:E4 5. Hit enter #excelwithumaer Excel for Data Analysts Great job! You have successfully calculated the SUM using the SUM function. Iva, Liam and Adora have 33 Pokeballs in total. Let's change a value to see what happens. Type B2(7): The value in cell B2 was changed from 2 to 7. Notice that the formulas are doing calculations when we change the value in the cells, and the SUM is updated from 33 to 38. It allows us to change values that are used by the formulas, and the calculations remain. Chapter Summary Values used in formulas can be typed directly and by using cells. The formula updates the result if you change the value of cells, which is used in the formula. The fill function can be used to continue your formulas upwards, downwards and sidewards. Excel has pre-built functions, such as SUM. #excelwithumaer Excel for Data Analysts Relative and Absolute References Excel Relative References Cells in Excel have unique references, which is its location. References are used in formulas to do calculations, and the fill function can be used to continue formulas sidewards, downwards and upwards. Excel has two types of references: 1. Relative references 2. Absolute references Absolute reference is a choice we make. It is a command which tells Excel to lock a reference. The dollar sign ($) is used to make references absolute. Example of relative reference: A1 Example of absolute reference: $A$1 Relative reference References are relative by default and are without dollar sign ($). The relative reference makes the cells reference-free. It gives the fill function freedom to continue the order without restrictions. Let's have a look at a relative reference example, helping the Pokemon trainers to count their Pokeballs (B2:B7) and Great balls (C2:C7). #excelwithumaer Excel for Data Analysts The result is: D2(5): Next, fill the range D2:D7: The references being relative allows the fill function to continue the formula for rows downwards. Have a look at the formulas in D2:D7. Notice that it calculates the next row as you fill. #excelwithumaer Excel for Data Analysts A Non-Working Example Let's try an example that will not work. Fill D2:G2, filling to the right instead of downwards. Resulting in strange numbers: Have a look at the formulas. It assumes that we are calculating sidewards and not downwards. The numbers that we want to calculate need to be in the same direction as we fill. #excelwithumaer Excel for Data Analysts Excel Absolute References Absolute References Absolute reference is when a reference has the dollar sign ($). It locks a reference in the formula. Add $ to the formula to use absolute references. The dollar sign has three different states: Absolute for column and row. The reference is absolutely locked. Example =$A$1 Absolute for the column. The reference is locked to that column. The row remains relative. Example =$A1 Absolute for the row. The reference is locked to that row. The column remains relative. Example =A$1 Let's have a look at an example of helping the Pokemon trainers to calculate prices for Pokeballs Type or copy the following data: #excelwithumaer Excel for Data Analysts Data explained There are 6 trainers: Iva, Liam, Adora, Jenny, Iben and Kasper. They have different amount of Pokeballs each in their shop cart The price per Pokeball is 2 coins Help them to calculate the prices for the Pokeballs. The price's reference is B11, we do not want the fill function to change this, so we lock it. The reference is absolutely locked by using the formula $B$11. How to do it, step by step: 1. Type C2(=) 2. Select B11 3. Type ($) before the B and 11 ($B$11) 4. Type (*) 5. Select B2 6. Hit enter 7. Auto fill C2:C7 #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts Congratulations! You successfully calculated the prices for the Pokeballs using an absolute reference. #excelwithumaer Excel For DATA ANALYSTS Day-6 BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Functions Functions Excel has many pre-made formulas, called functions. Functions are typed by = and the functions name. For example =SUM Once you have typed the function name you need to apply it to a range. For example =SUM(A1:A5) The range is always inside of parentheses. Let’s see some of the most important functions used by Data Analysts. Excel SUM Function SUM Function The SUM function is a premade function in Excel, which adds numbers in a range. It is typed =SUM Note: The =SUM function adds cells in a range, both negative and positive. How to use the =SUM function: 1. Select a cell 2. Type =SUM 3. Double-click the SUM command 4. Select a range 5. Hit enter #excelwithumaer Excel for Data Analysts Let's see some examples! #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts You have successfully calculated the sum of the stats using the =SUM function. The Pokemon's stats have a total sum of 3092. Let's change one of the values in the range, to see what happens. Type D7(350): Rattata total stats was changed from (D7)253 to (D7)350. The SUM function updated the total sum from D12(3092) to D12(3189). It updates the SUM when values inside of the range are changed. Lets change Rattata stats to a negative number to see what happens. Type D7(350): #excelwithumaer Excel for Data Analysts The SUM is updated to D12(2489). Adding a negative number subtracts that value from the range. The =SUM function adds both positive and negative numbers. Excel SUMIF Function SUMIF Function The SUMIF function is a premade function in Excel, which calculates the sum of values in a range based on a true or false condition. It is typed =SUMIF: =SUMIF(range, criteria, [sum_range]) The condition is referred to as criteria, which can check things like: If a number is greater than another number > If a number is smaller than another number < If a number or text is equal to something = The [sum_range] is the range where the function calculates the sum. #excelwithumaer Excel for Data Analysts Note: The [sum_range] is optional. If not specified, the function calculates the sum of the same range as the condition. Note: The different parts of the function are separated by a symbol, like a comma, or semicolon ; Example SUMIF function Find the sum of Total stats for Grass-type Pokemon: The condition is that the type is "Grass". Example SUMIF function, step by step: 1. Select the cell F3 2. Type =SUMIF 3. Double-click the SUMIF command #excelwithumaer Excel for Data Analysts 4. Specify the range for the conditionB2:B10 (the Type 1 values) 5. Type , 6. Specify the criteria (the cell E3, which has the value "Grass") 7. Type , 8. Specify the range for the sum C2:C10 (the Total values) 9. Type , 10. Hit enter The function now sums the Total stats for Grass type Pokemon. The function can be repeated for the other Pokemon types to compare them: #excelwithumaer Excel for Data Analysts Note: You can use the filling function for the other rows, but make sure to use absolute references for the ranges. Now, we can see the sum of total stats for the different types of Pokemon: Excel SUMIFS Function SUMIFS Function The SUMIFS function is a premade function in Excel, which calculates the sum of a range based on one or more true or false conditions. It is typed =SUMIFS: #excelwithumaer Excel for Data Analysts =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2] ...) The conditions are referred to as criteria1, criteria2, and so on, which can check things like: If a number is greater than another number > If a number is smaller than another number < If a number or text is equal to something = The criteria_range1, criteria_range2, and so on, are the ranges where the function checks for the conditions. The [sum_range] is the range where the function calculates the sum. Note: The different parts of the function are separated by a symbol, like a comma, or semicolon ; Example SUMIFS function Find the sum of total stats for Water-type 1st Generation Pokemon: The conditions are that the type is "Water" and Generation is 1. Note: The full dataset continues after row 14, all the way down to row 759. #excelwithumaer Excel for Data Analysts Example SUMIFS function, step by step: 1. Select the cell H3 2. Type =SUMIFS 3. Double-click the SUMIFS command 4. Specify the range for the sum C2:C759 (the Total values) 5. Type , 6. Specify the range for the first conditionB2:B759 (the Type 1 values) 7. Type , 8. Specify the criteria (the cell F3, which has the value "Water") 9. Type , 10. Specify the range for the second conditionD2:D759 (the Generation values) 11. Type , 12. Specify the criteria (the cell G3, which has the value "1") 13. Hit enter Note: You can add more conditions by repeating steps 9-12 before hitting enter. #excelwithumaer Excel for Data Analysts The function now calculates the sum of total stats for the 1st Generation Water type Pokemon. The function can be repeated for the following Generations to compare them: Note: You can use the filling function for the other rows, but make sure to use absolute references for the ranges. Now, we can see the sum of total stats of Water type Pokemon between generations: #excelwithumaer Excel for Data Analysts Excel MAX Function MAX Function The MAX function is a premade function in Excel, which finds the highest number in a range. It is typed =MAX The function ignores cells with text. It will only work for cells with numbers. Note: There is another function called MIN, which finds the lowest value in a range, the opposite of MAX. How to use the =MAX function: 1. Select a cell (G5) 2. Type =MAX 3. Double-click the MAX command 4. Select a range (D2:D21) 5. Hit enter Let's have a look at an example! Find the Pokemon which has the highest total stats in the range D2:D21: #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts The function has successfully found the highest value, 525. Cloyster has the highest Total stats of the Pokemons in the range D2:D21. Let's add text to a cell in the range D2:21 to see what happens. Type Alakazam to D8. #excelwithumaer Excel for Data Analysts The function ignores the text typed in the range. 510 is returned as the new highest value, since the old one was replaced with text. Poliwrath is now the Pokemon with the highest Total stats in the range D2:D21. #excelwithumaer Excel for Data Analysts Excel AVERAGE Function AVERAGE Function The AVERAGE function is a premade function in Excel, which calculates the average (arithmetic mean). It is typed =AVERAGE It adds the range and divides it by the number of observations. Example: The average of (2, 3, 4) is 3. 3 observations (2, 3 and 4) The sum of the observations (2 + 3 + 4 = 9) (9 / 3 = 3) The average is 3 Note: There are multiple types of mean values. The most common type of mean is the arithmetic mean. Note: The AVERAGE function ignores cells with text. Let's have a look at an example where we help the Pokemon trainers to calculate the average of Pokeballs per trainer. How to use the =AVERAGE function, step by step: 1. Select a cell (F2) 2. Type =AVERAGE 3. Double click the AVERAGE command 4. Select a range (B2:E2) 5. Hit enter 6. Next, Fill F2:F7 #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts You have successfully calculated the average using the AVERAGE function. Another Example Example using cells with text: The function ignores cells with text and completes the calculation. Excel COUNT Function COUNT Function The COUNT function is a premade function in Excel, which counts cells with numbers in a range. It is typed =COUNT Note: The COUNT function only counts cells with numbers, not cells with letters. The COUNTA function is better used if the cells have letters. How to use the =COUNT function: #excelwithumaer Excel for Data Analysts 1. Select a cell 2. Type =COUNT 3. Double-click the COUNT command 4. Select a range 5. Hit enter Let's see some examples! Apply the =COUNT function to range D2:D21. Counting the cells of Pokemon Total stats, which is numbers only: #excelwithumaer Excel for Data Analysts COUNT function, step by step: 1. Select D23 2. Type =COUNT 3. Double click COUNT in the menu 4. Select range D2:D21 5. Hit enter Note: The =COUNT function only counts cells with numbers in a range. #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts That's it! The =COUNT function successfully counted 20 cells with numbers. #excelwithumaer Excel for Data Analysts A Non-Working Example Now, let us try an example that will not work. Apply the =COUNT function to the range A2:A21, which only has cells with letters. #excelwithumaer Excel for Data Analysts It returns the value 0, no cells with numbers found. Range A2:A21 only had cells with letters. #excelwithumaer Excel For DATA ANALYSTS Day-7 (Top 10 Excel Functions) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts 1. Excel VLOOKUP Function VLOOKUP Function The VLOOKUP function is a premade function in Excel, which allows searches across columns. It is typed =VLOOKUP and has the following parts: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) Note: The column which holds the data used to lookup must always be to the left. Note: The different parts of the function are separated by a symbol, like comma, or semicolon ; Lookup_value: Select the cell where search values will be entered. Table_array: The table range, including all cells in the table. Col_index_num: The data which is being looked up. The input is the number of the column, counted from the left: #excelwithumaer Excel for Data Analysts Range_lookup: TRUE if numbers (1) or FALSE if text (0). Note: Both 1 / 0 and True / False can be used in Range_lookup. How to use the VLOOKUP function. 1. Select a cell (H4) 2. Type =VLOOKUP 3. Double click the VLOOKUP command 4. Select the cell where search value will be entered (H3) 5. Type (,) 6. Mark table range (A2:E21) 7. Type (,) 8. Type the number of the column, counted from the left (2) 9. Type True (1) or False (0) (1) 10. Hit enter 11. Enter a value in the cell selected for the Lookup_value H3(7) Let's have a look at an example! Use the VLOOKUP function to find the Pokemon names based on their ID#: #excelwithumaer Excel for Data Analysts H4 is where the search result is displayed. In this case, the Pokemons names based on their ID#. H3 selected as lookup_value. This is the cell where the search query is entered. In this case the Pokemons ID#. #excelwithumaer Excel for Data Analysts The range of the table is marked at table_array, in this example A2:E21. #excelwithumaer Excel for Data Analysts The number 2 is entered as col_index_number. This is the second column from the left and is the data that is being looked up. An illustration for selecting col_index_number 2. #excelwithumaer Excel for Data Analysts Ok, so next - 1 (True) is entered as range_lookup. This is because the most left column has numbers only. If it was text, 0 (False) would have been used. #excelwithumaer Excel for Data Analysts The function returns the #N/A value. This is because there have not been entered any value to the Search ID# H3. Let us feed a value to it, type H3(7): Have a look at that! The VLOOKUP function has successfully found the Pokemon Squirtle which has the ID# 7. One more time, type (H3)4: #excelwithumaer Excel for Data Analysts It still works! The function returned Charmanders name, which has 4 as its ID#. That's great. #excelwithumaer Excel for Data Analysts 2. INDEX and MATCH Function in Excel INDEX-MATCH has become a more popular tool for Excel as it solves the limitation of the VLOOKUP function, and it is easier to use. INDEX-MATCH function in Excel has a number of advantages over the VLOOKUP function: 1. INDEX and MATCH are more flexible and faster than Vlookup 2. It is possible to execute horizontal lookup, vertical lookup, 2-way lookup, left lookup, case-sensitive lookup, and even lookups based on multiple criteria. 3. In sorted Data, INDEX-MATCH is 30% faster than VLOOKUP. This means that in a larger dataset 30% faster makes more sense. Let’s begin with the detailed concepts of each INDEX and MATCH. INDEX Function The INDEX function in Excel is very powerful at the same time a flexible tool that retrieves the value at a given location in a range. In other words, It returns the content of a cell, specified by row and column offset. Syntax: =INDEX(reference, [row], [column]) Parameters: reference: The array of cells to be offset into. It can be a single range or an entire dataset in a table of data. row [optional]: The number of offset rows. It means if we choose a table reference range as “A1:A5” then the Cell/content that we want to extract is at how much vertical distance. Here, for A1 row will be 1, for A2 row = 2, and so on. If we give row = 4 then it will extract A4. As row is optional so if we don’t specify any row number then it extracts entire rows in the reference range. That is A1 to A5 in this case. column [optional]: The number of offset columns. It means if we choose a table reference range as “A1:B5” then the Cell/content we want to extract is at how much horizontal distance. Here, for A1 row will be 1 and the column will be 1, for B1 row will be 1 but the column will be 2 similarly for A2 row = 2 column = 1, for B2 row = 2 column = 2, and so on. If we give #excelwithumaer Excel for Data Analysts row = 5 and column 2 then it will extract B5. As the column is optional so if we don’t specify any row no. then it will extract the entire column in the reference range. For example, if we give row = 2 and column as empty then it will extract (A2:B2). If we don’t specify Row and column both then it will extract the entire reference table that is (A1:B5). Reference Table: The following table will be used as a reference table for all the examples of the INDEX function. The first Cell is at B3 (“FOOD”) and the Last Diagonal Cell is at F10 (“180”). Examples: Below are some examples of Index functions. #excelwithumaer Excel for Data Analysts Case 1: No Rows and Columns are mentioned. Input Command: =INDEX(B3:C10) Case 2: Only Rows are Mentioned. Input Command: =INDEX(B3:C10,2) #excelwithumaer Excel for Data Analysts Case 3: Both Rows And Columns are mentioned. Input Command: =INDEX(B3:D10,4,2) Case 4: Only Columns are mentioned. Input Command: =INDEX(B3 : D10 , , 2) Problem With INDEX Function: The problem with the INDEX function is that there is a need to specify rows and columns for the data that we are looking for. Let’s assume we are dealing with a machine learning dataset of 10000 rows and columns then it will be very difficult to search and extract the data that we are looking for. Here comes the concept of Match Function, which will identify rows and columns based on some condition. #excelwithumaer Excel for Data Analysts MATCH Function It retrieves the position of an item/value in a range. It is a less refined version of a VLOOKUP or HLOOKUP that only returns the location information and not the actual data. MATCH is not case-sensitive and does not care whether the range is Horizontal or Vertical. Syntax: =MATCH(search_key, range, [search_type]) Parameters: search_key: The value to search for. For example, 42, “Cats”, or I24. range: The one-dimensional array to be searched. It Can Either be a single row or a single column.eg->A1:A10 , A2:D2 etc. search_type [optional]: The search method. = 1 (default) finds the largest value less than or equal to search_key when the range is sorted in ascending order. o = 0 finds the exact value when the range is unsorted. o = -1 finds the smallest value greater than or equal to search_key when the range is sorted in descending order. Row number or Column number can be found using the match function and can use it inside the index function so if there is any detail about an item, then all information can be extracted about the item by finding the row/column of the item using match then nesting it into index function. Reference Table: The following table will be used as a reference table for all the examples of the MATCH function. First Cell is at B3 (“FOOD”) and the Last Diagonal Cell is At F10 (“180”) #excelwithumaer Excel for Data Analysts Examples: Below are some examples of the MATCH functionCase 1: Search Type 0, It means Exact Match. Input Command: =MATCH(“South Indian”,C3:C10,0) #excelwithumaer Excel for Data Analysts Case 2: Search Type 1 (Default). Input Command: =MATCH(“South Indian”,C3:C10) Case 3: Search Type -1. Input Command: =MATCH(“South Indian”,C3:C10,-1) #excelwithumaer Excel for Data Analysts INDEX-MATCH Together In the previous examples, the static values of rows and columns were provided in the INDEX function Let’s assume there is no prior knowledge about the rows and column position then rows and columns position can be provided using the MATCH function. This Is a dynamic way to search and extract value. Syntax: =INDEX(Reference Table , [Match(SearchKey,Range,Type)/StaticRowPosition], [Match(SearchKey,Range,Type)/StaticColumnPosition]) Reference Table: The following reference table will be used. The first Cell is at B3 (“FOOD”) and the Last Diagonal Cell is At F10 (“180”) Example: Let’s say the task is to find the cost of Masala Dosa. It is known that column 3 represents the cost of items, but the row position of Masala Dosa is not known. The problem can be divided into two stepsStep 1: Find the position of Masala Dosa by using the formula: =MATCH("Masala Dosa",B3:B10,0) Here B3:B10 represents Column “Food” and 0 means Exact Match. It will return the row number of Masala Dosa. Step 2: Find the cost of Masala Dosa. Use the INDEX Function to find the cost of Masala Dosa. By substituting the above MATCH function query inside the INDEX #excelwithumaer Excel for Data Analysts function at the place where the exact position of Masala Dosa is required, and the column number of cost is 3 which is already known. =INDEX(B3:F10, MATCH("Masala Dosa", B3:B10 , 0) ,3) Two Ways Lookup With INDEX-MATCH Together In the previous example, the column position Of the “Cost” attribute was hardcoded. So, It was not fully dynamic. Case 1: Let’s assume there is no knowledge about the column number of Cost also, then it can be obtained using the formula: =MATCH("Cost",B3:F3,0) Here B3:F3 represents Header Column. Case 2: When row, as well as column value, are provided via MATCH function (without giving static value) then it is called Two-Way Lookup. It can be achieved using the formula: =INDEX(B3:F10, MATCH("Masala Dosa",B3:B10, 0) , MATCH("Cost" ,B3:F3 ,0)) #excelwithumaer Excel for Data Analysts Left Lookup One of the key advantages of INDEX and MATCH over the VLOOKUP function is the ability to perform a “left lookup”. It means it is possible to extract the row position of an item from using any attribute at right and the value of another attribute in left can be extracted. For Example, Let’s say buy food whose cost should be 140 Rs. Indirectly we are saying buy “Biryani”. In this example, the cost Rs 140/- is known, there is a need to extract the “Food”. Since the Cost column is placed to the right of the Food column. If VLOOKUP is applied it will not be able to search the left side of the Cost column. That is why using VLOOKUP it is not possible to get Food Name. To overcome this disadvantage INDEX-MATCH function Left lookup can be used. Step 1: First extract row position of Cost 140 Rs using the formula: =MATCH(140, D3:D10,0) Here D3: D10 represents the Cost column where the search for the Cost 140 Rs row number is being done. Step 2: After getting the row number, the next step is to use the INDEX Function to extract Food Name using the formula: =INDEX(B3:B10, MATCH(140, D3:D10,0)) Here B3:B10 represents Food Column and 140 is the Cost of the food item. #excelwithumaer Excel for Data Analysts Case Sensitive Lookup By itself, the MATCH function is not case-sensitive. This means if there is a Food Name “DHOKLA” and the MATCH function is used with the following search word: 1. “Dhokla” 2. “dhokla” 3. “DhOkLA” All will return the row position of DHOKLA. However, the EXACT function can be used with INDEX and MATCH to perform a lookup that respects upper and lower case. Exact Function: The Excel EXACT function compares two text strings, taking into account upper and lower case characters, and returns TRUE if they are the same, and FALSE if not. EXACT is case-sensitive. Examples: 1. EXACT(“DHOKLA”,”DHOKLA”): This will return True. 2. EXACT(“DHOKLA”,”Dhokla”): This will return False. 3. EXACT(“DHOKLA”,”dhokla”): This will return False. 4. EXACT(“DHOKLA”,”DhOkLA”): This will return False. Example: Let say the task is to search for the Type Of Food “Dhokla” but in CaseSensitive Way. This can be done using the formula#excelwithumaer Excel for Data Analysts =INDEX(C3:C10, MATCH(TRUE , EXACT("Dhokla", B3:B10) ,0)) Here the EXACT function will return True if the value in Column B3:B10 matches with “Dhokla” with the same case, else it will return False. Now MATCH function will apply in Column B3:B10 and search for a row with the Exact value TRUE. After that INDEX Function will retrieve the value of Column C3:C10 (Food Type Column) at the row returned by the MATCH function. Multiple Criteria Lookup One of the trickiest problems in Excel is a lookup based on multiple criteria. In other words, a lookup that matches more than one column at the same time. In the example below, the INDEX and MATCH functions and Boolean logic are used to match on 3 columns1. Food. 2. Cost. 3. Quantity. To extract total cost. Example: Let’s say the task is to calculate the total cost of Pasta where 1. Food: Pasta. 2. Cost: 60. 3. Quantity: 1. #excelwithumaer Excel for Data Analysts So in this example, there are three criteria to perform a Match. Below are the steps for the search based on multiple criteriaStep 1: First match Food Column (B3:B10) with Pasta using the formula: "PASTA" = B3:B10 This will convert B3:B10 (Food Column) values as Boolean. That Is True where Food is Pasta or else False. Step 2: After that, match the Cost criteria in the following manner: 60 = D3:D10 This will replace D3:D10 (Cost Column) values as Boolean. That is True where Cost=60 else False. Step 3: Next step is to match the third criteria that are Quantity = 1 in the following manner: 1 = E3:E10 This will replace E3:E10 Column (Quantity Column) as True where Quantity = 1 else it will be False. Step 4: Multiply the result of the first, second, and third criteria. This will be the intersection of all conditions and convert Boolean True / False as 1/0. Step 5: Now the result will be a Column with 0 And 1. Here use the MATCH Function to find the row number of columns that contain 1. Because if a column is having the value 1, then it means it satisfies all three criteria. Step 6: After getting the row number use the INDEX function to get the total cost of that row. =INDEX(F3:F10, MATCH(1, ("Pasta"=B3:B10) * (60=D3:D10) * (1=E3:E10) , 0 )) Here F3:F10 represents the Total Cost Column. #excelwithumaer Excel for Data Analysts 3. Excel CONCAT Function CONCAT Function To concatenate is to link something together. CONCAT is a function in Excel and is short for concatenate. The CONCAT function is used to link multiple cells without adding any delimiters between the combined cell values. It is typed =CONCAT =CONCAT(cell1, delimiter, cell2) Note: Delimiters are spacing or symbols used to separate content elements apart from each other. Example of delimiters comma , semicolon ; quotes " or ' braces {} pipes | slashes / \ #excelwithumaer Excel for Data Analysts Info: CONCAT is a new version of the old CONCATENATE function. Recent versions of Excel do not accept the old CONCATENATE function as it is only compatible with earlier versions of Excel. To use CONCATENATE in the latest versions of Excel, use CONCAT. How to Use CONCAT Function To combine values from multiple Excel cells, use CONCAT. Note: The different parts of the function are separated by a symbol, like comma, or semicolon ; Step 1) Start the CONCAT function 1. Select a cell E2 2. Type =CONCAT 3. Double click the CONCAT command #excelwithumaer Excel for Data Analysts Step 2) Link cells 4. Select a cell (A2) 5. Add a comma (,) 6. Add a space inside of quotation marks to create a delimiter (" ") 7. Select another cell (A3) 8. Hit enter Note: The CONCAT function does not provide any delimiters between cell values used in the function. If you want your cell values to be displayed with delimiters, you have to add the delimiters between the selected cells. You can use any symbol as a delimiter, if you want the delimiter to be a space, enter " ". The function returns the content of A2 and A3 separated with a " " dilimiter. #excelwithumaer Excel for Data Analysts You can also use more symbols as a demilter, such as adding the word " and ". #excelwithumaer Excel for Data Analysts The CONCAT function accepts cell values of both text and numbers, you can combine them in any way you prefer. Combine the cell values with text strings as delimiters to make the output more descriptive! #excelwithumaer Excel for Data Analysts #excelwithumaer Excel for Data Analysts 4. Excel IFERROR Function When you work with data and formulas in Excel, you’re bound to encounter errors. To handle errors, Excel has provided a useful function – the IFERROR function. Before we get into the mechanics of using the IFERROR function in Excel, let’s first go through the different kinds of errors you can encounter when working with formulas. Types of Errors in Excel Knowing the errors in Excel will better equip you to identify the possible reason and the best way to handle these. Below are the types of errors you might find in Excel. #N/A Error This is called the ‘Value Not Available’ error. You will see this when you use a lookup formula and it can’t find the value (hence Not Available). Below is an example where I use the VLOOKUP formula to find the price of an item, but it returns an error when it can’t find that item in the table array. #DIV/0! Error You’re likely to see this error when a number is divided by 0. This is called the division error. In the below example, it gives a #DIV/0! error as the quantity value (the divisor in the formula) is 0. #excelwithumaer Excel for Data Analysts #VALUE! Error The value error occurs when you use an incorrect data type in a formula. For example, in the below example, when I try to add cells that have numbers and character A, it gives the value error. This happens as you can only add numeric values, but instead, I tried adding a number with a text character. #REF! Error This is called the reference error and you will see this when the reference in the formula is no longer valid. This could be the case when the formula refers to a cell reference and that cell reference does not exist (happens when you delete a row/column or worksheet that was referred to in the formula). #excelwithumaer Excel for Data Analysts In the below example, while the original formula was =A2/B2, when I deleted Column B, all the references to it became #REF! and it also gave the #REF! error as the result of the formula. #NAME ERROR This error is likely to be a result of a misspelled function. For example, if instead of VLOOKUP, you by mistake use VLOKUP, it will give a name error. #NUM ERROR Num error can occur if you try and calculate a very large value in Excel. For example, =187^549 will return a number error. #excelwithumaer Excel for Data Analysts Another situation where you can get the NUM error is when you give a nonvalid number argument to a formula. For example, if you’re calculating the Square Root of a number and you give a negative number as the argument, it will return a number error. For example, in the case of the Square Root function, if you give a negative number as the argument, it will return a number error (as shown below). While I have shown only a couple of examples here, there can be many other reasons that can lead to errors in Excel. When you get errors in Excel, you can’t just leave it there. If the data is further used in calculations, you need to make sure the errors are handled the right way. Excel’s IFERROR function is a great way to handle all types of errors in Excel. Using the IFERROR function, you can specify what you want the formula to return instead of the error. If the formula does not return an error, then its own result is returned. IFERROR Function Syntax =IFERROR(value, value_if_error) Input Arguments value – this is the argument that is checked for the error. In most cases, it is either a formula or a cell reference. value_if_error – this is the value that is returned if there is an error. The following error types evaluated: #N/A, #REF!, #DIV/0!, #VALUE!, #NUM!, #NAME?, and #NULL!. Additional Notes: If you use “” as the value_if_error argument, the cell displays nothing in case of an error. #excelwithumaer Excel for Data Analysts If the value or value_if_error argument refers to an empty cell, it is treated as an empty string value by the Excel IFERROR function. If the value argument is an array formula, IFERROR will return an array of results for each item in the range specified in value. Excel IFERROR Function – Examples Here are three examples of using IFERROR function in Excel. Example 1 – Return Blank Cell Instead of Error If you have functions that may return an error, you can wrap it within the IFERROR function and specify blank as the value to return in case of an error. In the example shown below, the result in D4 is the #DIV/0! error as the divisor is 0. In this case, you can use the following formula to return blank instead of the ugly DIV error. =IFERROR(A1/A2,””) This IFERROR function would check whether the calculation leads to an error. If it does, it simply returns a blank as specified in the formula. #excelwithumaer Excel for Data Analysts Here, you can also specify any other string or formula to display instead of the blank. For example, the below formula would return the text “Error”, instead of the blank cell. =IFERROR(A1/A2,”Error”) Note: If you are using Excel 2003 or a prior version, you will not find the IFERROR function in it. In such cases, you need to use the combination of IF function and ISERROR function. Example 2 – Return ‘Not Found’ when VLOOKUP Can’t Find a Value When you use the Excel VLOOKUP Function, and it can’t find the lookup value in the specified range, it would return the #N/A error. For example, below is a data set of student names and their marks. I have used the VLOOKUP function to fetch the marks of three students (in D2, D3, and D4). #excelwithumaer Excel for Data Analysts While the VLOOKUP formula in the above example finds the names of first two students, it can’t find Josh’s name on the list and hence it returns the #N/A error. Here, we can use the IFERROR function to return a blank or some meaningful text instead of the error. Below is the formula that will return ‘Not Found’ instead of the error. =IFERROR(VLOOKUP(D2,$A$2:$B$12,2,0),”Not Found”) Note that you can also use IFNA instead of IFERROR with VLOOKUP. While IFERROR would treat all kinds of error values, IFNA would only work on the #N/A errors and wouldn’t work with other errors. #excelwithumaer Excel for Data Analysts Example 3 – Return 0 in case of an Error If you don’t specify the value to return by IFERROR in the case of an error, it would automatically return 0. For example, if I divide 100 with 0 as shown below, it would return an error. However, if I use the below IFERROR function, it would return a 0 instead. Note that you still need to use a comma after the first argument. #excelwithumaer Excel for Data Analysts Example 4 – Using Nested IFERROR with VLOOKUP Sometimes when using VLOOKUP, you may have to look through the fragmented table of arrays. For example, suppose you have the sales transaction records in 2 separate worksheets and you want to look-up an item number and see it’s value. Doing this requires using nested IFERROR with VLOOKUP. Suppose you have a dataset as shown below: In this case, to find the score for Grace, you need to use the below nested IFERROR formula: =IFERROR(VLOOKUP(G3,$A$2:$B$5,2,0),IFERROR(VLOOKUP(G3,$D$2:$E$5,2,0 ),"Not Found")) This kind of formula nesting ensure that you get the value from either of the table and any error returned is handled. Note that in case the tables are on the same worksheet, however, in a real-life example, it likely to be on different worksheets. #excelwithumaer Excel for Data Analysts 5. Excel Filter Function Below is the syntax of the FILTER function: =FILTER(array,include,[if_empty]) array – this is the range of cells where you have the data and you want to filter some data from it include – this is the condition that tells the function what records to filter [if_empty] – this is an optional argument where you can specify what to return in case no results are found by the FILTER function. By default (when not specified), it returns the #CALC! error Now let’s have a look at some amazing Filter function examples and stuff it can do which used to be quite complex in its absence. Example 1: Filtering Data Based on One Criteria (Region) Suppose you have a dataset as shown below and you want to filter all the records for the US only. Below is the FILTER formula that will do this: =FILTER($A$2:$C$11,$B$2:$B$11="US") #excelwithumaer Excel for Data Analysts The above formula uses the dataset as the array and the condition is $B$2:$B$11=”US” This condition would make the FILTER function check every cell in column B (one that has the region) and only those records that match this criterion would be filtered. Also, in this example, I have the original data and the filtered data on the same sheet, but you can also have these in separate sheets or even workbooks. Filter Function returns a result that is a dynamic array (which means that instead of returning one value, it returns an array that spills to other cells). For this to work, you need to have an area where the result would come to be empty. In any of the cells in this area (E2:G5 in this example) already has something in it, the function will give you the #SPILL error. Also, since this is a dynamic array, you can not change a part of the result. You can either delete the entire range that has the result or cell E2 (where the formula was entered). Both of these would delete the entire resulting array. But you can not change any individual cell (or delete it). In the above formula, I have hard-coded the region value, but you can also have it in a cell and then reference that cell that has the region value. For example, in the below example, I have the region value in cell I2 and this is then referenced in the formula: #excelwithumaer Excel for Data Analysts =FILTER($A$2:$C$11,$B$2:$B$11=I1) This makes the formula even more useful and now you can simply change the region value in cell I2 and the filter would automatically change. You can also have a drop-down in cell I2 where you can simply make the selection and it would instantly update the filtered data. Example 2: Filtering Data Based on One Criteria (More Than or Less Than) You can also use comparative operators within the filter function and extract all the records that are more or less than a specific value. For example, suppose you have the dataset as shown below and you want to filter all the records where the sales value is more than 10000. The below formula can do this: =FILTER($A$2:$C$11,($C$2:$C$11>10000)) #excelwithumaer Excel for Data Analysts The array argument refers to the entire dataset and the condition, in this case, is ($C$2:$C$11>10000). The formula checks each record for the value in Column C. If the value is more than 10000, it is filtered, else it’s ignored. In case you want to get all the records less than 10000, you can use the below formula: =FILTER($A$2:$C$11,($C$2:$C$11<10000)) You can also get more creative with the FILTER formula. For example, if you want to filter the top three record based on the sales value, you can use the below formula: =FILTER($A$2:$C$11,($C$2:$C$11>=LARGE(C2:C11,3))) #excelwithumaer Excel for Data Analysts The above formula uses the LARGE function to get the third-largest value in the dataset. This value is then used in the FILTER function criteria to get all the records where the sales value is more than or equal to the third-largest value. Example 3: Filtering Data with Multiple Criteria (AND) Suppose you have the below dataset and you want to filter all the records for the US where the sale value is more than 10000. This is an AND condition where you need to check for two things – the region needs to the US and the sales need to be more than 10000. If only one condition is met, the results should not be filtered. #excelwithumaer Excel for Data Analysts Below is the FILTER formula that will filter records with the US as the region and sales of more than 10000: =FILTER($A$2:$C$11,($B$2:$B$11="US")*($C$2:$C$11>10000)) Note that the criterion (called the include argument) is ($B$2:$B$11=”US”)*($C$2:$C$11>10000) Since I am using two conditions and I need both to be true, I have used the multiplication operator to combine these two criteria. This returns an array of 0’s and 1’s, where a 1 is returned only when both conditions are met. In case there are no records that meet the criteria, the function would return the #CALC! error. And in case you want to return something meaningful (instead of the error), you can use a formula as shown below: =FILTER($A$2:$C$11,($B$2:$B$11="USA")*($C$2:$C$11>10000),"Nothing Found") Here, I have used “Not Found” as the third argument, which is used when no records are found that match the criteria. #excelwithumaer Excel for Data Analysts Example 4: Filtering Data with Multiple Criteria (OR) You can also modify the ‘include’ argument in the FILTER function to check for an OR criteria (where any one of the given conditions can be true). For example, suppose you have the dataset as shown below and you want to filter the records where the country is either the US or Canada. Below is the formula that will do this: =FILTER($A$2:$C$11,($B$2:$B$11="US")+($B$2:$B$11="Canada")) #excelwithumaer Excel for Data Analysts Note that in the above formula, I have simply added the two conditions by using the addition operator. Since each of these conditions returns an array of TRUEs and FALSEs, I can add to get a combined array where it’s TRUE if any one of the conditions is met. Another example could be when you want to filter all the records where either the country is the US or the sale value is more than 10000. The below formula will do this: =FILTER($A$2:$C$11,($B$2:$B$11="US")+(C2:C11>10000)) Note: When using AND criteria in a FILTER function, use the multiplication operator (*) and when using the OR criteria, use the addition operator (+). Example 5: Filtering Data To Get Above/Below Average Records You can use formulas within the FILTER function to filter and extract records where the value is above or below the average. For example, suppose you have the dataset as shown below and you want to filter all the records where the sale value is above average. You can do that using the following formula: =FILTER($A$2:$C$11,C2:C11>AVERAGE(C2:C11)) #excelwithumaer Excel for Data Analysts Similarly, for below-average, you can use the below formula: =FILTER($A$2:$C$11,C2:C11<AVERAGE(C2:C11)) Example 6: Filtering Only the EVEN Number Records (Or ODD Number Records) In case you need to quickly filter and extract all the records from even-number rows or odd-number rows, you can do that with the FILTER function. To do this, you need to check the row number within the FILTER function, and only filter row numbers that meet the row number criteria. Suppose you have the dataset as shown below and I only want to extract evennumbered records from this dataset. #excelwithumaer Excel for Data Analysts Below is the formula that will do this: =FILTER($A$2:$C$11,MOD(ROW(A2:A11)-1,2)=0) The above formula uses the MOD function to check the row number of each record (which is given by the ROW function). The formula MOD(ROW(A2:A11)-1,2)=0 returns TRUE when the row number is even and FALSE when it’s odd. Note that I have subtracted 1 from the ROW(A2:A11) part as the first record is in the second row, and this adjusts the row number to consider the second row as the first record. Similarly, you can filter all the odd-numbered records using the below formula: =FILTER($A$2:$C$11,MOD(ROW(A2:A11)-1,2)=1) Example 7: Sort the Filtered the Data With Formula Using FILTER function with other functions allows us to get a lot more done. For example, if you filter a dataset using the FILTER function, you can use the SORT function with it to get the result that is already sorted. Suppose you have a dataset as shown below and you want to filter all the records where the sales value is more than 10000. You can use the SORT function with the function to make sure the resulting data is sorted based on the sales value. #excelwithumaer Excel for Data Analysts The below formula will do this: =SORT(FILTER($A$2:$C$11,($C$2:$C$11>10000)),3,-1) The above function uses the FILTER function to get the data where the sale value in column C is more than 10000. This array returned by the FILTER function is then used within the SORT function to sort this data based on the sales value. The second argument in the SORT function is 3, which is to sort based on the third column. And the fourth argument is -1 which is to sort this data in descending order. So these are 7 examples to use the FILTER function in Excel. #excelwithumaer Excel for Data Analysts 6. Sequence Function in Excel Sequencing your data in an Excel worksheet is a tedious task. But fortunately, those days are long gone! Though many users may think of using the AutoFill feature to list down the numbers series in a sequence. But this modern autofill feature doesn't work if you have a more specified sequential task to perform. Therefore, in such cases, you can use the inbuilt SEQUENCE function, which is specially created for this pursuit. In this tutorial, you will learn what is Sequence function, its syntax, parameter, points to remember, how this formula works and various examples by using the Sequence function to return a new dynamic array by auto-generating a series of Roman numbers and random integers What is Sequence Function? "The SEQUENCE function is an inbuilt Excel function that generates an array of sequential numbers whether number, roman number, alphabets. For example: 1, 2, 3, etc." The SEQUENCE function is a new dynamic array function that generates a list of sequential numbers in an array. Though the resultant array can be onedimensional or two-dimensional, determined by the specified parameters i.e., rows and columns. This function always returns a dynamic array that arranging the rows and columns in the specified sequence. The SEQUENCE function is introduced in the new Microsoft Excel 365. Therefore, if you are using the previous Excel versions, this function won't be available. To use this function, make sure to update your Excel version to Excel 365 or above. NOTE: If you are trying to access the Sequence function in previous Excel versions, unlike Excel 2019, Excel 2016, and lower, you won't find it. Syntax SEQUENCE(rows, [columns], [start], [step]) #excelwithumaer Excel for Data Analysts Parameters Rows (required) - This parameter represents the number of rows to sequence your data. Columns (optional) - This parameter represents the number of columns to fill. If the user doesn't provide this argument, by default it takes 1. Start (optional) - This parameter represents the starting number in the sequence. If the user doesn't provide this argument, by default it takes 1. Step (optional) - This parameter represents the increment or decrement for each subsequent value in the sequence. It can take the following values: If you provide a positive number, the start number gets added in the subsequent value, producing an ascending sequential order. If you provide a negative number, the start number gets subtracted from the subsequent values decrease, creating a sequential order. If you don't provide any value to this parameter, by default it takes 1. Return Type The Excel Sequence Function returns a dynamic array by automatically arranging the rows and columns in the specified sequence. Formula to create a number sequence in Excel If you want to create a column of rows with sequential numbers starting at 1, you can use the Excel SEQUENCE function in its simplest form: To place values in the first row: =SEQUENCE(1) To put value in a column: SEQUENCE(1, n) Where n represents the number of values available in the sequence. For instance, to create a column with 100 numbers, enter the following formula in the first cell (we have takes B2 in our case) and press the Enter button: =SEQUENCE(100) #excelwithumaer Excel for Data Analysts The output will be automatically be spilled in the rows starting from the selected row. Things to Remember about Sequence Function Before working on Microsoft Excel Sequence Function, make sure to go through with the below facts: The SEQUENCE function is only available in the Microsoft Excel 365 or the newer versions. Therefore, if you are using the previous Excel versions (2019, 2018, etc), this function won't be available and it won't create dynamic arrays. If the array of sequential numbers is the final output, Excel aligns all the numbers automatically in a spill range. So, always make sure you provide sufficient empty cells (using the rows and columns parameter) to the down and right of the cell where you enter the formula; otherwise, Excel will throw a #SPILL error. The returned array can be 1-dimensional or 2-dimensional depending upon how you pass the rows and parameters in the Sequence function. If any optional parameter is omitted, by default, its value is 1. Examples: #SEQUENCE Example1: How to create a number sequence in descending order in Excel In the below sheet, as you see we have a list of values organised in a random order. #excelwithumaer Excel for Data Analysts As asked in the question, to arrange the values in their descending order using the Sequence function, we just need to do a little trick, i.e., we will supply negative one (-1) in the step parameter. Follow the below-given steps to fetch the descending sequential series of the above-given numbers using the Excel Sequence() function: Step 1: Select a cell to position your Sequenced data Place your mouse cursor to a cell from where you want to start the sequencing of your data. In our case, we have selected cell C2 of our Excel worksheet. Refer to the given below image: #excelwithumaer Excel for Data Analysts STEP 2: Type the SEQUENCE function In the selected cell, we will start your function with the equal to (=) sign followed by the Sequence function. The formula will be as follows: = SEQUENCE( STEP 3: Insert all the parameters At first, this function will ask you to specify the ROWS parameter. We will specify the number to fill and sequence the values. Since we have 10 values so here we will mention 10. The formula will be = SEQUENCE(10, The next argument is Column. This parameter represents the Column to start the sequence here we will specify 1. = SEQUENCE(10,1, Next, specify the start parameter. In this, we will specify the value we want to start our sequencing with. Here we will mention 10. = SEQUENCE(10,1,10 Since we want the sequencing to be ordered in descending order. Therefore in the step parameter, we will specify -1. = SEQUENCE(10,1,10,1) #excelwithumaer Excel for Data Analysts Step 4: The Sequence function will return the output As a result, the SEQUENCE function will return the 10 numbers in descending sequential order. #excelwithumaer Excel for Data Analysts This function will select 10 values and start the counting from 10. It will subtract 1 from 10, and return 9. Again, it will subtract 1 and return 8, and in the pattern, it will return 10 values in the descending sequential order. Example2: How to create a 2-D array where sequential order moves vertically top to bottom. When working with an array of cells, the standard sequencing rule goes horizontally across the first row till its last element, and next, it moves down to the next row, in a similar method to reading text from left to right. But in various scenarios, the range of cells is not listed in sequential order as per the given Excel data. To propagate the above data in the top to bottom order across the first column and then right to the next column, we will use the combination of the SEQUENCE function and the TRANSPOSE function. Follow the below-given steps to fetch the results using Excel SEQUENCE() function: Step 1: Select a cell to position your Sequenced data Place your mouse cursor to a cell from where you want to start the sequencing of your data. In our case, we have selected cell F2 of our Excel worksheet. Refer to the given below image: #excelwithumaer Excel for Data Analysts STEP 2: Type the SEQUENCE function In the selected cell, we will start your function with the equal to (=) sign followed by the Sequence function. The formula will be as follows: = SEQUENCE( STEP 3: Insert all the parameters At first, this function will ask you to specify the ROWS parameter. Since in our case we have our data in three rows. Therefore, we will specify 3 in this parameter. The formula will be = SEQUENCE(3, The next argument is Column. This parameter represents the Column to start the sequence. Since we have 3 columns, therefore will specify 3. The formula will be = SEQUENCE(3,3, Next, specify the start parameter. In this, we will specify the value we want to start our sequencing with. Here we will mention 10. The formula will be = SEQUENCE(3,3,10 #excelwithumaer Excel for Data Analysts Since we want the sequencing to be ordered with a gap of 10 order. Therefore, in the step parameter, we will specify 10. = SEQUENCE(3,3,10,10) Step 4: The Sequence function will return the output As a result, the regular SEQUENCE function will moves horizontally left to right (column-wise) and return the following maintaining a gap of 10 between the values. Step 5: Nest Sequence function inside the Transpose Function Though the above output is also correct, that's not what we were looking for. In the question, we are asked to create a sequence that moves vertically from top to bottom (row-wise), maintaining order of 10. Therefore, we will use the Transpose function and nest the above Sequence function inside it. The formula will be as follows: =TRANSPOSE(SEQUENCE(3, 3, 10, 10)) #excelwithumaer Excel for Data Analysts Step 6: Excel will fetch you the result Once done, press the enter button and Excel will arrange all the data in the specified sequence where the is arranged in the array sequencing vertically from top to bottom (row-wise). Refer to the below image for your reference. #excelwithumaer Excel for Data Analysts 7. Excel String Functions – LEFT, RIGHT, and MID Excel is mostly about numerical, however, we often have data of text data type. Here are a few functions we should know to handle text data. LEFT RIGHT MID The LEFT function The LEFT function returns a given text from the left of our text string based on the number of characters specified. Syntax: LEFT(text, [num_chars]) Parameters: Text: The text we want to extract from. Num_chars (Optional): The number of characters you want to extract. Default num_chars is 1 and the number must be a positive number that is greater than zero. Example: Step 1: Format your data. Now if you want to get the first “Geeks” from “Geeksforgeeks” in B2. Let us follow the next step. #excelwithumaer Excel for Data Analysts Step 2: We will enter =LEFT(B2,5) in the B3 cell. Here we want Excel to extract the first 5 characters from the left side of our text in B2. This will return “Geeks”. The RIGHT Function The RIGHT function returns a given text from the left of our text string based on the number of characters specified. Syntax: RIGHT(text, [num_chars]) Parameters: Text: The text we want to extract from. Num_chars (Optional): The number of characters you want to extract. Default num_chars is 1 and the number must be a positive number that is greater than zero. #excelwithumaer Excel for Data Analysts Example: Step 1: Format your data. Now if you want to get the last geeks from “Geeksforgeeks” in B2. Let us follow the next step. Step 2: We will enter =RIGHT(B2,5) in the B3 cell. Here we want Excel to extract the last 5 characters from the right side of our text in B2. This will return “geeks”. #excelwithumaer Excel for Data Analysts The MID function The MID function returns the text from any middle part of our text string based on the starting position and the number of characters specified. Syntax: MID(text, start_num, num_chars) Parameters: Text: The text we want to extract from. start_num: The starting number of the first character from the text we want to extract. Num_chars: The number of characters you want to extract. #excelwithumaer Excel for Data Analysts Example: Step 1: Format your data. Now if you want to get the character “for” which is located in the middle of our text “Geeksforgeeks” in B2. Let us follow the next step. Step 2: We will enter =MID(B2,5,3) in the B3 cell. Here we want Excel to extract the characters located in the middle of our text in B2. This will return “for”. #excelwithumaer Excel for Data Analysts 8. Excel SMALL and LARGE functions Want to pick out the smallest or the largest numbers from your dataset? But don’t want to reposition it? The SMALL and LARGE functions of Excel will help you do that without reshaping your data. I will walk you through both these functions using multiple examples. So don’t wait any further – and dive right in. How to use the SMALL function The SMALL function (just like you guessed it) will extract the k-th smallest value from any given dataset It has two required arguments: Array – the array of range values from where the smallest value is sought K – the k-th smallest value that is sought I know it’s always boring to keep reading about functions. So how about an example The holiday season is yet not over, and we have a list of airlines with their ticket prices mentioned next to them. #excelwithumaer Excel for Data Analysts Let’s find the 4th cheapest ticket from the list above To help you double-check the accuracy of the function, we have organized the data in ascending order. This is not needed to run the SMALL otherwise 1. Write the SMALL function as below: = SMALL ( #excelwithumaer Excel for Data Analysts 2. For the first argument (array), create a reference to the cell range containing the numeric values (from where the smallest value is sought). We are creating a reference to the cell range B2:B8. = SMALL (B2:B8 3. For argument K, write the position of the lowest value. We want to find the 4th cheapest ticket. In other words, we seek the 4th smallest value from the dataset above. So our function becomes: = SMALL (B2:B8, 4) #excelwithumaer Excel for Data Analysts Pro Tip! Be careful while you write the k argument. If the value for k is a number smaller than 1 or a number greater than the number of values in your dataset, the SMALL function will return the #NUM error or the wrong value. For example, the data above has a total of 7 numerical values. If you write the k argument as 8 (or any number greater than 7), you’ll end up getting the #NUM error #excelwithumaer Excel for Data Analysts 4. You’re only an ‘Enter’ away from the desired results. So go on and hit it. That’s $700 by Purple Airlines. Impressive to see how the SMALL function works, isn’t it The SMALL function is available in all versions of Microsoft Excel starting from Excel 2010 to Excel 365. How to use the LARGE function If you thought the LARGE function would be a dupe of the SMALL function – you made a bang-on target The Excel LARGE function will extract the k-th largest value from any given dataset. It also has the same two arguments: Array – the array of range values from where the largest value is sought K – the k-th largest value that is sought #excelwithumaer Excel for Data Analysts Let’s not go any far and try using the LARGE function on the same example, as above. However, this time, we are on the hunt for the second-highest ticket price 1. Write the LARGE function as below: = LARGE ( 2. For the first argument (array), create a reference to the cell range containing the values (from where the largest value is sought). We are again creating a reference to the cell range B2:B8. = LARGE (B2:B8 #excelwithumaer Excel for Data Analysts 3. For argument K, write the position of the largest value. We want to find the 2nd most expensive ticket (the 2nd largest value) from the dataset above. So our function becomes: = LARGE (B2:B8, 2) #excelwithumaer Excel for Data Analysts 4. Hit Enter to get the results as follows: That’s $900 by Red Airlines #excelwithumaer Excel for Data Analysts Both the SMALL and the LARGE functions are super simple to use. And you vouch for that too now, don’t you? Pro Tip! Why were the LARGE and SMALL functions needed when Excel had the MIN and the MAX functions The MIN and the MAX functions will only return the minimum and the maximum values from a given dataset. However, you don’t want the lowest but the second, third (or any k-th) lowest or highest numeric value from the same dataset, these functions would no more help. That’s where you’d need the LARGE and the SMALL function SMALL and LARGE functions examples The basic application of the SMALL and the LARGE function is just that simple. And now, we are diving into more examples for both these functions. Example #1: SMALL and LARGE function with Dates Did you know? You can use the SMALL and LARGE functions with dates too We will show you that here. The images below have a list of flights (all scheduled for different dates). #excelwithumaer Excel for Data Analysts To see when the third latest flight is scheduled, let’s apply the LARGE function: 1. Write the LARGE function as below: = LARGE (B2:B8 For the first argument (array), we have referred to the cell range that contains the dates. 2. For argument K, write 3. That’s because we want to find the third latest flight. = LARGE (B2:B8, 3) #excelwithumaer Excel for Data Analysts 3. Hit Enter to get the results as follows That’s on 31st May 2023. #excelwithumaer Excel for Data Analysts Pro Tip! Instead of the date (31st May 2023), are you getting a serial number as result? If that’s the case, relax There is no problem with your function. You only need to reformat the subject cell. To do that: Select the cell. Go to the Home Tab > Format > Short Date Format. And everything will be sorted. Similarly, if you want to find the third earliest flight: 4. Write the SMALL function as follows: = SMALL (B2:B8, 3) The function above translates as “Find the 3rd smallest date from the cell range B2 to B8″. 5. Hit Enter to get the results. #excelwithumaer Excel for Data Analysts And there you have it! On 25th March 2023 Example #2: With the XLOOKUP function In the above example, we have found the third earliest and the third latest dates when the flights are scheduled. But what if we want the answer to be different? What if you want to fetch Flight No., and not the date when that flight is scheduled We need to combine the XLOOKUP function with the SMALL and LARGE functions to get that. So let’s do it. 1. Write the XLOOKUP function as follows: = XLOOKUP ( #excelwithumaer Excel for Data Analysts 2. As the lookup_value, write in the LARGE function as written above. = XLOOKUP ( LARGE (B2:B8, 3) #excelwithumaer Excel for Data Analysts We have just told Excel to look for the third largest value from the cell range B2:B8. 3. Create a reference to the lookup range (where the lookup value is to be looked for). The lookup value will be the third latest date, so the lookup range will be the cell range where the dates sit = XLOOKUP ( LARGE (B2:B8, 3), B2:B8 #excelwithumaer Excel for Data Analysts 4. Create a reference to the return array. We want the flight number to be returned so, the return array will be the column for flight numbers. = XLOOKUP ( LARGE (B2:B8, 3), B2:B8, A2:A8) #excelwithumaer Excel for Data Analysts 5. Hit Enter. We get Flight No. 1. Check out the date against it. It’s 31st May 2023 – the same that we got above Let’s do the same for the third earliest flight. Here you go! 6. Write the XLOOKUP function as follows: = XLOOKUP ( SMALL (B2:B8, 3), B2:B8, A2:A8) Take a closer look at the function above. We have only replaced the LARGE function with the SMALL function. And the results are here. This time it’s Flight No. 2 (dated 25th March 2023) #excelwithumaer Excel for Data Analysts The Excel UNIQUE function can extract a list of distinct values, or a list of values that only occur once, i.e. unique values. It can return a unique or distinct list from one column or from multiple columns. Syntax: =UNIQUE(array, [by_col], [occurs_once]) array is the range or array you want the unique values returned from. by_col is an optional logical value (TRUE/FALSE) and allows you to compare values by row (FALSE), or by column (TRUE). occurs_once is also an optional logical value (TRUE/FALSE) and allows you to find the truly unique values, i.e. the values that only occur once (TRUE), or all distinct values (FALSE). If you omit this argument, it will default to FALSE and return a distinct list. Note: The UNIQUE function is part of the new Excel Dynamic Arrays family and at the time of writing, Dynamic Arrays are only available in Office 365 and are currently in beta on the Insiders channel. Excel 2019 will not have the Dynamic Array functions. Excel UNIQUE Function Examples Let’s say we want to find a list of distinct values from the Item column (C) in the table below: #excelwithumaer Excel for Data Analysts We can write a simple UNIQUE formula like this: =UNIQUE(C7:C21) You can see the results in cells B26:B30 in the image below: The Excel UNIQUE function ‘spills’ the results into the rows below. This is the new dynamic array behaviour that occurs when the final result of the formula returns multiple values. Note: In the example above, I’ve omitted the by_col argument, which means it will default to FALSE and compare values by row. I’ve also omitted the occurs_once argument so it has defaulted to FALSE and returned a distinct list. Extract a list of Unique Values #excelwithumaer Excel for Data Analysts If you want to find a list of values that only occur once in a list, i.e. a list of truly unique values, the occurs_once argument is set to TRUE. In the example below, you can see ‘Support’ is the only unique value in the range A2:A9: Extracting UNIQUE Rows of Values In the example below, you can see there are whole rows containing duplicates. Setting the by_col and occurs_once arguments to FALSE we get a list of unique rows, as shown below: #excelwithumaer Excel for Data Analysts 10. SUMIFS function in Excel. Already discussed in Day 6 of #excelwithumaer series. #excelwithumaer Excel For DATA ANALYSTS Day-8 (Excel Data Analysis) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Tables Table Ranges can be converted into tables. Tables make it easier to structure and organize data. Note: The filter function is similar to a table. The filter can be better used if the only function needed is to sort and filter data. Tables connect cells in a range and put them into a fixed structure. The cells in the table range share the same formatting. Note: Tables can be used to prepare data for charts and pivot tables. Tables allow for options such as: Sort & Filter Formatting Auto Filling Note: Tables can be converted back to the range. Example Formatting a range into a table will give it a new form with a fixed structure. Tables open access to new functionality such as filtering, automation, and styling. #excelwithumaer Excel for Data Analysts Example (Converting a Range to Table) How to convert range to table, step by step. 1. Select range A1:F22 #excelwithumaer Excel for Data Analysts 2. Click Insert, then Table ( ), in the Ribbon. 3. Click OK Note: The range (A1:F22) already has headers in row 1. Unchecking the "My table has headers" option allows you to create a dedicated header if you do not already have it. The range A1:F22 was successfully converted from range to table. #excelwithumaer Excel for Data Analysts The range is now a fixed table structure and new options such as sorting and filtering are now enabled. Applying the filter keeps the relationship between the columns while sorting and filtering. Excel Table Design Table Design Tables can be customized and styled in a few clicks. Converting a range into a table gives access to a menu called "Table Design". The menu appears when selecting a cell in the table's range. This menu has options and commands such as: Resize Remove duplicates Convert to range Style options (Total row, Header row, Banded row etc..) Formatting Table Name Excel gives tables default names such as: Table 1, Table 2, Table 3 and so on. Note: Tables cannot be renamed in the Excel online version. The name of the table can be found in the Table Design tab 1. Select the table 2. Click the Table design menu 3. See the name input field #excelwithumaer Excel for Data Analysts Note: It is useful to know the table names when you have many tables in a workbook and are referring to them in formulas. Excel Table Resizing Table Resizing The size of a table can be changed. Resizing is to increase or decrease the range of the table. There are three ways to resize a table Resize table command Drag to resize Adding headers Resize Table Command The resize table command allows you to change the size of the table by entering a range. For example by entering A1:D10. The command is found in the Ribbon under the Table Design tab. Example - Resizing a Table #excelwithumaer Excel for Data Analysts Convert the range into a table. Lets resize the table from range A1:F12 to A1:F20 1. Select the table 2. Click the Table Design menu #excelwithumaer Excel for Data Analysts 3. Click the Resize Table command ( ) Clicking the Resize Table command allows you to set a new range for the table. 4. Click the range input field 5. Type the new range, A1:F20 6. Click OK #excelwithumaer Excel for Data Analysts The table has been resized to from A1:F12 to A1:F20. Drag to Resize The table can be resized by dragging its corner. Example - Dragging to Resize, Smaller Change the tables size from A1:F12 to A1:D5 1. Press and hold the bottom right corner of the table ( ) #excelwithumaer Excel for Data Analysts 2. Move the pointer, marking the range A1:D5 The table range has been changed from A1:F12 to A1:D5. Note: Cells outside of the table range are no longer included in the table. The connection between the cells created by the table is broken and they no longer have the table formatting. Let's try to sort the Pokemon by their names to see what happens. 1. Click the filter option in A1 2. Sort by Ascending (A-Z) #excelwithumaer Excel for Data Analysts The filter option only includes the Pokemon in the tables range (A1:A5). The connection to the cells outside of the table is broken. Lets resize again, this time bigger. Example - Dragging to Resize, Bigger Change the tables size from A1:D5 to A1:G13 1. Press and hold the bottom right corner of the table ( ) 2. Move the pointer to mark A1:G13 #excelwithumaer Excel for Data Analysts The table range has been changed from A1:D5 to A1:G13. The rest of the cells are now included again, and the connection between the cells is back. Let's try to filter the Pokemon by their names to see what happens. 1. Click the filter option in A1 2. Sort by Ascending (A-Z) Nice! The table has successfully sorted the Pokemon in the range A1:A12 by their names. Something has changed. A new column (G) has appeared... #excelwithumaer Excel for Data Analysts Increasing the table size will continue the formatting, formulas and add new columns. Note: It will not overwrite the name for existing headers. It will use the value that is typed in the header cell. The header name can be changed. 1. Double click G1 2. Delete the text 3. Type "Mighty" to G1 #excelwithumaer Excel for Data Analysts Removing Duplicates Excel has a command to remove duplicates in tables. Note: Duplicates are extra copies of values. Removing duplicates are helpful when cleaning a dataset and you do not want to include copies. The Remove Duplicate function is found in the Ribbon under the Table Design tab. The command allows you to specify the column where you want to find and remove duplicates. Once applied it will return the number of deleted values and how many unique ones that remains. Note: The remove duplicate command will not ask for which duplicates to delete. Make sure that it does not delete useful data. Examples - Remove Duplicates command Lets try an example removing the duplicate Pokemon in the range A1:E13 #excelwithumaer Excel for Data Analysts Convert the range into a table. 1. Select the table 2. Click the Table Design tab ( ) 3. Click the Remove Duplicates command ( ) 4. Leave all columns checked 5. Click OK Note: Unchecking a column means that it will not remove duplicates for that column. #excelwithumaer Excel for Data Analysts The command returns the number of found and removed duplicates and how many unique ones that remain. 6. Click OK The remove duplicates command has successfully removed the 9 duplicate Pokemon from the range and the table has been resized accordingly. The remaining 3 values are unique. Excel Converting a Table to Range Tables can be reversed and converted back to the range. Tables can be converted to ranges by selecting a cell in the table range and clicking on the Convert to Range command. The command to convert to range is found in the Table Design tab, in the Tools group. Example - Convert Table to Range #excelwithumaer Excel for Data Analysts Convert the range into a table. 1. Select a cell in the table range (A1:F16) 2. Click the Design Table tab ( 3. Click the Convert to Range command ( ) ) #excelwithumaer Excel for Data Analysts The table is now converted into a range and it no longer has the table options available. Note: The cell formatting is kept for the range after the conversion. Excel Table Style Excel has many ready-to-use styles which can be applied to tables. Table styles is to change the appearance of the table. It can be changed to: Make it easier to read and understand Make it look better The table style is Blue, Table Style Medium 2 by default. #excelwithumaer Excel for Data Analysts Example: Blue, Table Style Medium 2, which is how the default looks like. Excel has three main categories for Table styles: Light; Light colors, more white space Medium; Medium colors, medium white space Dark; Dark colors, less white space The table style can be applied in a few steps. Example - Applying Light Style Type or copy the values to follow along: #excelwithumaer Excel for Data Analysts Convert the range into a table. 1. Select a cell in the table range 2. Click the Design Table tab ( ) 3. Click on the Table Styles option button Note: The Table Style that is already applied has a green rectangle around it. In this case Blue, Table Style Medium 2. Clicking the Table Style option button opens a menu with different style options. Here the three categories are presented; Light, Medium and Dark. #excelwithumaer Excel for Data Analysts 4. Click on the Light, Green, Table Style Light 21. Found in the Light category. Well done! The formatting of the table has changed to the light green style. Apply Gray, Table Style Dark 4. Found in the Dark category. #excelwithumaer Excel for Data Analysts Note: Get familiar with the Table Styles. Try different options to see how they look. Excel Sorting Ranges can be sorted using the Sort Ascending and Sort Descending commands. Sort Ascending: from smallest to largest. Sort Descending: from largest to smallest. The sort commands work for text too, using A-Z order. Note: To sort a range that has more than one column, the whole range has to be selected. Sorting just one can breaks the relationship between columns. This is shown in an example later in this chapter. #excelwithumaer Excel for Data Analysts The commands are found in the Ribbon under the Sort & Filter menu ( ) Example Sort (text) Sort the Pokemons in the range A2:A21 by their Name, ascending from smallest to largest (A-Z). 1. Select A2:A21 2. Open the Sort & Filter menu 3. Click Sort Ascending Note: A1 is not included as it is the header for the column. This is the row that is dedicated to the filter. Including it will blend it with the rest. #excelwithumaer Excel for Data Analysts The Sort Ascending function successfully sorted the Pokemons by their Name ascending from A-Z. Example Sort (numbers) Sort the Pokemons ascending by their Total stats from smallest to largest. 1. Select A2:A21 #excelwithumaer Excel for Data Analysts 2. Open the Sort & Filter menu 3. Click Sort Ascending #excelwithumaer Excel for Data Analysts The Pokemons were successfully sorted by their Total stats from smallest to largest. The sort commands work for both text and numbers. A Non-Working Example (sorting one column in a range) In this example we have two columns with related data. Column A is the Pokemons Names and Column B is their Total stats. Try sorting just one of the columns (A2:A21) ascending by their Names. #excelwithumaer Excel for Data Analysts The attempt to sort results in a warning. It is not recommended to sort the names alone because it will break the relationship between the Pokemons Names and their Total stats. Click "Just sort" to see what happens. #excelwithumaer Excel for Data Analysts This breaks the relationship with Column A and B. The Pokemons now have wrong Total stats. Clicking the other option in the warning "Expand and Sort" makes the sort function include Column B and sorts them in relation to each other. Sorting More Than One Column Select the whole range when sorting ranges with more than one column. Note: When sorting multiple columns, it will always sort by the first column (leftmost). #excelwithumaer Excel for Data Analysts Select A2:B21 and sort the range ascending. By selecting range A2:B21 it sorts correctly, keeping the relationship between the data (Columns A and B). #excelwithumaer Excel for Data Analysts Excel Filter Filters can be applied to sort and hide data. It makes data analysis easier. Note: Filter is similar to formatting a table, but it can be applied and deactivated. The menu is accessed in the default Ribbon view or in the Data section in the navigation bar. Applying Filter Filters are applied by selecting a range and clicking the Filter command. It is important to have a row of headers when applying filters. Having headers is useful to make the data understandable. Note: Filters are applied to the top row in a range. Like in the example below, the dedicated row is row 1. #excelwithumaer Excel for Data Analysts Let's apply filters to the data set, step by step. 1. Select range A1:E1 #excelwithumaer Excel for Data Analysts 2. Click the Sort & Filter menu 3. Click the Filter command New buttons have been added to the cells in the top row. This indicates that the Filter was successfully applied. The buttons can be clicked to access the different Sort & Filter options. #excelwithumaer Excel for Data Analysts A Non-Working Example Lets delete row 1 (the header row) and apply filters to the new row 1, to see what happens. The filter is applied and has replaced the header row. It is important to dedicate a header row for the filter. #excelwithumaer Excel for Data Analysts Filter options The filter options allow for sorting and filtering. Applying filter keeps the relationship between the columns while sorting and filtering. Clicking the options button opens the menu. #excelwithumaer Excel for Data Analysts Sorting Ranges can be sorted and the relationship between the columns is kept. Sort Ascending (A-Z) sorted from smallest to largest. Sort Descending (Z-A) sorts from largest to smallest. You can read more about Sorting in a previous chapter. Filtering Filters can be applied to hide and sort data. This is helpful for analysis, to select the data that you want to see or not. Example Filter Use the filter option to filter on Pokemon that is Type 1, Bug. Step by step 1. Click the drop down menu on C1 ( ) and choose the Filter option. This is the Column which holds the Type 1 data. #excelwithumaer Excel for Data Analysts Note: "Items" are the different categories in that column; Grass, Fire, Water and so on. All items are checked by default. The checked items are the ones that are shown. Uncheck to hide. 2. Uncheck all items, except Bug, which is the type that we want to show. #excelwithumaer Excel for Data Analysts 3. Click OK The range was successfully sorted by Type 1, Bug. All shown Pokemons are Bug type. Note: The unchecked rows are hidden, not deleted. This is explained by looking at the row numbers. The numbers are jumping from 1 to 11 and 16 to 22. The rows in between are hidden. #excelwithumaer Excel for Data Analysts Note: Checking the items will have the rows shown again. Another Example Use the filter option to filter the Pokemons which have Type 1, Bug and Type 2, Poison. 1. Click the filter option in D1 2. Uncheck all items except Poison 3. click OK That is on point! We have sorted the range based on Type 1, Bug and Type 2, Poison. The filter option is helpful to make ranges easier to analyse. #excelwithumaer Excel For DATA ANALYSTS Day-9 (CONDITIONAL FORMATTING) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Conditional Formatting Conditional Formatting Conditional formatting is used to change the appearance of cells in a range based on your specified conditions. The conditions are rules based on specified numerical values or matching text. Changing the appearance of cells can visually highlight interesting data points for analysis. The browser version of Excel provides a number of built-in conditions and appearances: Note: The web browser version of Excel only offers a selection of built-in conditional formatting options. The Excel application has the option of creating fully customized conditional formatting rules. #excelwithumaer Excel for Data Analysts Conditional Formatting Example Here, the Speed values of each pokemon is formatted with a Color Scale: Note: Excel has several different color scales to pick from. Color Scale Formatting Example Highlight the Speed values of each Pokemon with Color scale conditional formatting. Conditional formatting, step by step: 1. Select the range of Speed values C2:C9 #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon the Home menu in the ribbon, from 3. Select the Color Scales from the drop-down menu There are 12 Color Scale options with different color variations. The color on the top of the icon will apply to the highest values. #excelwithumaer Excel for Data Analysts 4. Click on the "Green - Yellow - Red Colour Scale" icon Now, the Speed value cells will have a colored background highlighting: Dark green is used for the highest values, and dark red for the lowest values. Charizard has the highest Speed value (100) and Squirtle has the lowest Speed value (43). All the cells in the range gradually change color from green, yellow, orange, then red. #excelwithumaer Excel for Data Analysts Excel Highlight Cell Rules Highlight Cell Rules Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. The conditions are rules based on specified numerical values, matching text, calendar dates, or duplicated and unique values. Here is the Highlight Cell Rules part of the conditional formatting menu: Appearance Options The web browser version of Excel offers the following appearance options for conditionally formatted cells: Light Red Fill with Dark Red Text Yellow Fill with Dark Yellow Text Green Fill with Dark Green Text Light Red Fill #excelwithumaer Excel for Data Analysts Red Text Red Border Here is how the options look in a spreadsheet: Cell Rule Types Excel offers the following cell rule types: Greater Than... Less Than... Between... Equal To... Text That Contains... A Date Occurring... Duplicate/Unique Values Highlight Cell Rule Example The "Equal To..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being equal to your specified value. The specified value could be a particular number or particular text. In this example, the specified value will be "48". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to all of the different stat values. "Equal To..." Highlight Cell Rule, step by step: 1. Select the range C2:H8 for all of the stat values 2. Click on the Conditional Formatting icon Home menu in the ribbon, from the 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Equal To... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter 48 into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values equal to "48" will be highlighted in yellow: #excelwithumaer Excel for Data Analysts All of Ditto's stat values are 48, so they are highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. Highlight Cell Rules - Greater Than Excel HCR - Greater Than Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Greater Than... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Greater Than Example The "Greater Than..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being greater than to your specified value. The specified value is typically a number, but it also works with a text value. In this example, the specified value will be "65". You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the HP values. "Greater Than..." Highlight Cell Rule, step by step: 1. Select the range C2:C8 for HP values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Greater Than... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Enter 65 into the input field 6. Select the appearance option "Green Fill with Dark Green Text" from the dropdown menu #excelwithumaer Excel for Data Analysts Now, the cells with values greater than "65" will be highlighted in green: Gyarados, Lapras and Vaporeon have HP values greater than 65, so they are hightlighted. Note: Jolteon's HP value is 65, but is not highlighted, since the rule does not include the specified value itself. Note: You can remove the Highlight Cell Rules with Manage Rules. Highlight Cell Rule - Greater Than Example (with Text) The "Greater Than..." Highlight Cell Rule also works with text values. Excel will use alphabetical order (A-Z) to highlight the text values that starts with a letter that is later in the alphabet than the specified value. In this example, the specified text value will be "Gyarados". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Name values. "Greater Than..." Highlight Cell Rule, step by step: 1. Select the range A2:A8 for Name values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Greater Than... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter Gyarados into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with text values later in the alphabet than "Gyarados" will be highlighted in yellow: Magikarp starts with "M", Lapras with "L", Vaporeon with "V", and Jolteon with "J". "M", "L", "V", and "J" are all later in the alphabet than "G", which Gyarados starts with, so these all are highlighted. But, what about the rest of the letters in the text value? Let's see what happens if we add a fictional pokemon with a new name: #excelwithumaer Excel for Data Analysts Notice that the fictional "Gzarados" is highlighted. The Excel condition checks each letter in the specified text value from left to right. Because the "z" in "Gzarados" comes later in the alphabet than the "y" in "Gyarados", this is considered Greater Than and is highlighted. Highlight Cell Rules - Less Than Excel HCR - Less Than Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Less Than... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Less Than Example The "Less Than..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being less than to your specified value. The specified value is typically a number, but it also works with a text value. In this example, the specified value will be "55". You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Attack values. "Less Than..." Highlight Cell Rule, step by step: 1. Select the range D2:D8 for Attack values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Less Than... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Enter 55 into the input field 6. Select the appearance option "Light Red Fill with Dark Red Text" from the dropdown menu #excelwithumaer Excel for Data Analysts Now, the cells with values less than "55" will be highlighted in red: Only Magikarp and Ditto have Attack values less than 55, so these values are highlighted. Note: Eevees's Attack value is 55, but is not highlighted, since the rule does not include the specified value itself. Note: You can remove the Highlight Cell Rules with Manage Rules. Highlight Cell Rule - Less Than Example (with Text) The "Less Than..." Highlight Cell Rule also works with text values. Excel will use alphabetical order (A-Z) to highlight the text values that starts with a letter that is earlier in the alphabet than the specified value In this example, the specified text value will be "Electric". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Type 1 values. "Less Than..." Highlight Cell Rule, step by step: 1. Select the range B2:B8 for Type 1 values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Less Than... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter Electric into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with text values earlier in the alphabet than "Electric" will be highlighted in yellow: Nothing seems to have changed! Water starts with "W" and Normal starts with "N". "W"and "N" are all later in the alphabet than "E", which Electric starts with, so none of these are highlighted. Note: The specified value "Electric" itself is also not highlighted, because the rule only hightlights text values that are earlier in the alphabet. So, what about the rest of the letters in the text value? #excelwithumaer Excel for Data Analysts Let's see what happens if we add a fictional pokemon with a new Name and Type: Notice that the fictional "Ficteon" has the type "Eclectic", which is highlighted. The Excel condition checks each letter in the specified text value from left to right. Because the "c" in "Eclectic" comes earlier in the alphabet than the "l" in "Electric", this is considered Less Than and is highlighted. Excel Highlight Cell Rules - Between Highlight Cell Rules - Between Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Between... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Between Example The "Between..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being between two specified values. The specified values is typically numbers, but can also be text values. In this example, the specified values will be "79" and "100". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to all of the different stat values. "Between..." Highlight Cell Rule, step by step: 1. Select the range C2:H8 for all of the stat values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Between... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter 79 and 100 into the input fields 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values between "79" and "100" will be highlighted in yellow: Notice that Gyarados' Defense and Special Defense, which are 79 and 100, are hightlighted. The Between... condition includes the specified values. This is different from the Greater Than... and Less Than... conditions, which do not include the specified values. Note: You can remove the Highlight Cell Rules with Manage Rules. #excelwithumaer Excel for Data Analysts Highlight Cell Rules - Equal To Excel HCR - Equal To Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Equal To... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: Highlight Cell Rule - Equal To Example (with Numbers) The "Equal To..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being equal to your specified value. The specified value could be a particular number or particular text. In this example, the specified value will be "48". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to all of the different stat values. "Equal To..." Highlight Cell Rule, step by step: 1. Select the range C2:H8 for all of the stat values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Equal To... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter 48 into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values equal to "48" will be highlighted in yellow: #excelwithumaer Excel for Data Analysts All of Ditto's stat values are 48, so they are highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. Highlight Cell Rule - Equal To Example (with Text) The "Equal To..." Highlight Cell Rule also works with text values. In this example, the specified text value will be "Magikarp". You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Name values. "Equal To..." Highlight Cell Rule, step by step: 1. Select the range A2:A8 for Name values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Equal To... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Enter Magikarp into the input field #excelwithumaer Excel for Data Analysts 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with text values equal to "Magikarp" will be highlighted in yellow: Note: The Equal To... Highlight Cell Rule will highlight cells that exactly match the specified value. You can use the Text That Contains rule for highlighting cells that have values with any part matching the specified value. #excelwithumaer Excel for Data Analysts Highlight Cell Rules - Text That Contains Excel HCR - Text That Contains Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Text That Contains... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: Highlight Cell Rule - Text That Contains Example (with Text) The "Text That Contains..." Highlight Cell Rule will highlight a cell with one of the appearance options based on a part of the cell value containing your specified value. The specified value is typically text, but also works with a numerical value. In this example, the specified value will be "Pidge". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Name values. "Text That Contains..." Highlight Cell Rule, step by step: 1. Select the range A2:A8 for the Name values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Text That Contains... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter Pidge into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values Text That Contains "Pidge" will be highlighted in yellow: #excelwithumaer Excel for Data Analysts The names "Pidgey", "Pidgeot", and "Pidgeotto" all start with "Pidge", so all these cells are highlighted. Note: The Text That Contains rule works with any part of the cell values. Like in the example below: Highlight Cell Rule - Text That Contains Example 2 (with Text) The "Text That Contains..." Highlight Cell Rule will highlight a cell with one of the appearance options based on a part of the cell value containing your specified value. The specified value is typically text, but also works with a numerical value. In this example, the specified value will be "row". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Name values. "Text That Contains..." Highlight Cell Rule, step by step: 1. Select the range A2:A8 for the Name values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Text That Contains... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter row into the input field 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values Text That Contains "row" will be highlighted in yellow: The names "Spearow" and "Fearow" both end with "row", so both cells are highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Text That Contains Example (with Numbers) The "Text That Contains..." The highlight Cell Rule also works with numbers. In this example, the specified text value will be "7". You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to all the different stat values. "Text That Contains..." Highlight Cell Rule, step by step: 1. Select the range C2:H8 for all the stat values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Text That Contains... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Enter 7 into the input field 6. Select the appearance option "Green Fill with Dark Green Text" from the dropdown menu Now, the cells with values That Contains "7" anywhere will be highlighted in green: #excelwithumaer Excel for Data Analysts Note: The Text That Contains... Highlight Cell Rule will highlight cells that have values with any part matching the specified value. You can use the Equal To... rule for highlighting cells that exactly match the specified value. Highlight Cell Rules - A Date Occurring Excel HCR - A Date Occurring Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. A Date Occurring... is one of the options for the condition. Here is the Highlight Cell Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Highlight Cell Rule - A Date Occurring Example The "A Date Occurring..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value relative to a specified time frame. The time frame can be: Yesterday Today Tomorrow In the last 7 days Last Week This Week Next Week Last Month This Month Next Month In this example, the specified time frame will be "next month". #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Let's apply the rule to the Birthday values. "A Date Occurring..." Highlight Cell Rule, step by step: 1. Select the range C2:C19 for the Birthday values 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the A Date Occurring... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Select "Next Month" from the dropdown menu 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, the cells with values A Date Occurring next month will be highlighted in yellow: Note: In this example, the next month happens to be September. #excelwithumaer Excel for Data Analysts Turtwig, Chimchar, Piplup, Snivy, Tepig, and Oshawott all have birthdays in September, so their cells are highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. Excel Highlight Cell Rules - Equal To Excel HCR - Duplicate and Unique Values Highlight Cell Rules - Duplicate and Unique Values Highlight Cell Rules is a premade type of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Duplicate Values. is one of the options for the condition, and can check for both duplicate and unique values. Here is the Highlight Cell Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Duplicate Value Example The "Duplicate Value..." Highlight Cell Rule will highlight a cell with one of the appearance options based on the cell value being the same as other cells in the range. You can choose any range for where the Highlight Cell Rule should apply. It can be a a few cells, a single column, a single row, or a combination of multiple cells, rows and columns. #excelwithumaer Excel for Data Analysts Let's apply the rule to all of the cells values. "Equal To..." Hightlight Cell Rule, step by step: 1. Select the range A2:H8 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Duplicate Values... from the menu #excelwithumaer Excel for Data Analysts This will open a dialog box where you can specify the value and the appearance option. 5. Select Duplicate 6. Select the appearance option "Yellow Fill with Dark Yellow Text" from the dropdown menu Now, all the cells in the range that have the same value as another cell are highlighted in yellow: All of Ditto's stat values are 48 and all of Mew's stat values are 100, so they are all highlighted. All of the Dittos and all of the Normal Type values are also highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. #excelwithumaer Excel for Data Analysts Highlight Cell Rule - Unique Value Example The "Duplicate Values..." Highlight Cell Rule can also find and highlight Unique Values. Let's apply this to the same set of data: You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows and columns. Let's apply the rule to all of the cells values. "Equal To..." Highlight Cell Rule, step by step: 1. Select the range A2:H8 2. Click on the Conditional Formatting icon from Home menu in the ribbon, #excelwithumaer Excel for Data Analysts 3. Select the Highlight Cell Rules from the drop-down menu 4. Select the Duplicate Value... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Select Unique from the dropdown menu 6. Select the appearance option "Green Fill with Dark Green Text" from the dropdown menu Now, the cells with unique values will be highlighted in green: #excelwithumaer Excel for Data Analysts Mew and Psychic only appear once in the range, so these values are highlighted. Note: You can remove the unwanted duplicates from a table with the Removing Duplicate Function. Excel Conditional Formatting - Top/Bottom Rules Excel Top/Bottom Rules Top/Bottom Rules Top/Bottom Rules are premade types of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Here is the Top/Bottom Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Appearance Options The web browser version of Excel offers the following appearance options for conditionally formatted cells: Light Red Fill with Dark Red Text Yellow Fill with Dark Yellow Text Green Fill with Dark Green Text Light Red Fill Red Text Red Border Here is how the options look in a spreadsheet: Top/Bottom 10 Items Example The "Top 10 Items..." and "Bottom 10 Items..." rules will highlight cells with one of the appearance options based on the cell value being the top or bottom values in a range. Note: The default number of items is 10, but you can specify any whole number up to 1000 for Top/Bottom Items to be highlighted. #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. #excelwithumaer Excel for Data Analysts Let's first apply the Top 10 Items... rule to the Speed values. "Top 10 Items..." Rule, step by step: 1. Select the range C2:C31 for Speed values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Top/Bottom Rules from the drop-down menu 4. Select the Top 10 Items... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Leave the default value 10 in the input field 6. Select the appearance option "Green Fill with Dark Green Text" from the dropdown menu #excelwithumaer Excel for Data Analysts Now, the 10 cells with the top values will be highlighted in green: Now, the top 10 Speed values are easily identified. Let's try the same with the bottom 10 Speed values. #excelwithumaer Excel for Data Analysts Note: Multiple rules can be applied to the same range. Repeat the steps, but instead choose the Bottom 10 Items... in the menu and select the "Light Red Fill with Dark Red Text" appearance option. Now, the slowest values are also highlighted: #excelwithumaer Excel for Data Analysts Notice that there are actually 11 items highlighted in red. Why could this be? Let's sort the table with descending Speed values for a clue: #excelwithumaer Excel for Data Analysts We can see that both Pidgey and Nidorina have a Speed of 56. So, they are tied for the 10th bottom value. Note: When using the Top/Bottom 10... conditional formatting, values that tie will all be highlighted. Top/Bottom 10% Example The "Top 10%..." and "Bottom 10%..." rules will highlight cells with one of the appearance options based on the cell value being the top or bottom percent of values in a range. Note: The default percent of items is 10, but you can specify any whole number up to 100 for Top/Bottom Percent to be highlighted. Let's apply Top and Bottom 10% rules to the same dataset with sorted Speed values: #excelwithumaer Excel for Data Analysts You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows and columns. Let's first apply the Bottom 10%... rule to the Speed values. "Bottom 10%..." Rule, step by step: 1. Select the range C2:C31 for Speed values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Top/Bottom Rules from the drop-down menu 4. Select the Bottom 10%... from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Leave the default value 10 in the input field 6. Select the appearance option "Light Red Fill with Dark Red Text" from the dropdown menu #excelwithumaer Excel for Data Analysts Now, the bottom 10% of cells will be highlighted in red: Notice that there are 3 highlighted cells. There are 30 cells in the range, so 10% of that is 3 cells. #excelwithumaer Excel for Data Analysts Note: The number of cells will be rounded down to the closest whole number based on the percent. For example: 6% of 30 is 1.8, which will be rounded down to 1 cell 7% of 30 is 2.1, which will be rounded down to 2 cells Let's try the same with the top 10% Speed values. Repeat the steps, but instead choose Top 10%... in the menu and select the "Green Fill with Dark Green Text" appearance option. Now, the fastest values are also highlighted: #excelwithumaer Excel for Data Analysts Notice that there are actually 4 items highlighted in green. We can see that both Charizard and Fearow have a Speed of 100. So, they are tied for the 3rd top value. Both are included in the top 10% and are highlighted. Note: You can remove the Highlight Cell Rules with Manage Rules. Excel Above and Below Average Rules Above and Below Average Rules are premade types of conditional formatting in Excel used to change the appearance of cells in a range based on your specified conditions. Above and Below Average Rules are found in the Top/Bottom Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Appearance Options The web browser version of Excel offers the following appearance options for conditionally formatted cells: Light Red Fill with Dark Red Text Yellow Fill with Dark Yellow Text Green Fill with Dark Green Text Light Red Fill Red Text Red Border Here is how the options look in a spreadsheet: Above and Below Average Example The "Above Average" rule will highlight cells with one of the appearance options based on the cell value being the above the average value in a range. Note: You can use Excel to calculate the average value of a range, like in the example data below: #excelwithumaer Excel for Data Analysts Note: The Average value row is separated from the data with a visual border. Check out how to add this in the format borders chapter. You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows and columns. Let's first apply the Above Average rule to the HP values. "Above Average" Rule, step by step: 1. Select the range C2:C11 for HP values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select the Top/Bottom Rules from the drop-down menu 4. Select Above Average from the menu This will open a dialog box where you can specify the value and the appearance option. 5. Select the appearance option "Green Fill with Dark Green Text" from the dropdown menu #excelwithumaer Excel for Data Analysts Now, the cells with above average HP values (more than 77.2) will be highlighted in green: Let's try the same with the below average HP values. Note: Multiple rules can be applied to the same range. Repeat the steps, but instead choose Below Average in the menu and select the "Light Red Fill with Dark Red Text" appearance option. Now, the below average values are also highlighted: #excelwithumaer Excel for Data Analysts Note: You can remove the Highlight Cell Rules with Manage Rules. Notice that there are more below average values than above average values. Why could this be? The number of above or below average value cells in a range will depend on the actual values in the range. If some values in the range are extra large this will increase the average by a lot. Let's add a fictional Pokemon with a very high HP stat value to illustrate this: The fictional Wigglytuffest has 1000 HP, which increases the average value all the way up to more than 161. Now, only Wigglytuffest has an above average HP stat value, and every other Pokemon has below average HP stat values. Note: This kind of average value is referred to as the mean. #excelwithumaer Excel for Data Analysts Excel Conditional Formatting - Data Bars Data Bars Data Bars are premade types of conditional formatting in Excel used to add colored bars to cells in a range to indicate how large the cell values are compared to the other values. Here is the Data Bars part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Data Bars Example You can choose any range for where the Highlight Cell Rule should apply. It can be a few cells, a single column, a single row, or a combination of multiple cells, rows, and columns. Note: The size of the data bars depends on the smallest and largest cell value in the range. Let's apply the Data Bars conditional formatting to the Speed values. "Data Bars", step by step: 1. Select the range C2:C10 for Speed values #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon from Home menu in the ribbon, 3. Select Data Bars from the drop-down menu 4. Select the "Green Data Bars" color option from the Gradient Fill menu Note: Both Gradient Fill and Solid Fill work the same way. The only difference between those, and the color options are aesthetic. Now, all of the Speed value cells have a green bar showing how big the value is compared to the other values in the range: #excelwithumaer Excel for Data Analysts Electrode has the highest value, 140, so the bar fills the entire cell. The other bars are scaled relative to the highest value and 0 by default. Exeggcute has the lowest value, 40, so this is the shortest bar. Though, it is larger than 0, so there is still a small bar. Let's see what happens if we add a fictional Pokemon with a 0 Speed value: The fictional Neutrinode has a Speed value of 0, so this becomes an invisible "minimum" bar. Let's see what happens if we add another fictional Pokemon with a negative Speed value: #excelwithumaer Excel for Data Analysts Now, the fictional Positrode has the lowest Speed value, -140, so this becomes an invisible "minimum" bar. Notice that all the other bars have now been scaled relative to the new minimum (-140). Neutrinode's Speed value of 0 is now in the middle between -140 and 140, so the cell has a bar filling half the cell. Electrode still has the highest Speed value, 140, so this bar still fills the entire cell. Note: You can remove the Highlight Cell Rules with Manage Rules. Excel Conditional Formatting - Color Scales Color Scales Color Scales are premade types of conditional formatting in Excel used to highlight cells in a range to indicate how large the cell values are compared to the other values in the range. Here is the Color Scales part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts Color Scale Formatting Example Highlight the Speed values of each Pokemon with Color Scale conditional formatting. Color Scales, step by step: 1. Select the range of Speed values C2:C8 #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon the Home menu in the ribbon, from 3. Select the Color Scales from the drop-down menu There are 12 Color Scale options with different color variations. The color on the top of the icon will apply to the highest values. 4. Click on the "Green - Yellow - Red Colour Scale" icon #excelwithumaer Excel for Data Analysts Now, the Speed value cells will have a colored background highlighting: Dark green is used for the highest values, and dark red for the lowest values. Rapidash has the highest Speed value (105) and Slowpoke has the lowest Speed value (15). All the cells in the range gradually change color from green, yellow, orange, then red. Note: The color formatting is relative to the smallest and largest cell values in the range. #excelwithumaer Excel for Data Analysts Let's see what happens if we add a fictional Pokemon with an even slower Speed value than Slowpoke: Now, the fictional Slowestpoke has the lowest Speed value of 1, which is highlighted in dark red. Notice that the color of Slowpoke's Speed value now is highlighted in orange instead of dark red. Let's see what happens if we add another fictional Pokemon that is faster than any of the other Pokemon: The fictional Fastestpoke has a higher Speed value (200) than any of the other pokemon and is highlighted in dark green. #excelwithumaer Excel for Data Analysts Rapidash' Speed value of 105 is no longer the highest value and is highlighted with a lighter green. Notice that the Speed values of the other Pokemon also change as the highest value in the range is now 200 instead of 105. Note: You can remove the Highlight Cell Rules with Manage Rules. Excel Conditional Formatting - Icon Sets Icon Sets Icon Sets are premade types of conditional formatting in Excel used to add icons to cells in a range to indicate how large the cell values are compared to the other values in the range. Note: Icon Sets can be used together with other conditional formatting rules. Icon Sets Options Excel has a number of different icon sets, organized as: Directional Shapes #excelwithumaer Excel for Data Analysts Indicators Ratings Icon Set Formatting Example Add icons to the Speed values of each Pokemon with Icon Set conditional formatting. Icon Sets, step by step: 1. Select the range of Speed values C2:C10 #excelwithumaer Excel for Data Analysts 2. Click on the Conditional Formatting icon the Home menu in the ribbon, from 3. Select the Icon Sets from the drop-down menu 4. Click on the "3 Traffic Lights (Unrimmed)" option #excelwithumaer Excel for Data Analysts Now, the Speed value cells will have icons indicating how large the values are compared to the other values in the range: The green traffic light is used for the highest values, yellow for the middle values, and red for the lowest values. Excel automatically calculates and chooses which values get which colored traffic light icon. Note: You can remove the Highlight Cell Rules with Manage Rules. Excel Conditional Formatting - Manage Rules Excel Manage Rules Conditional Formatting rules can be managed and removed using the Clear Rules and Manage Rules features. Here is the Clear Rules part of the conditional formatting menu: #excelwithumaer Excel for Data Analysts You can remove all the rules from a selected range of cells or from the entire spreadsheet using the Clear Rules menu options. Conditional Formatting - Manage Rules Example You can also use the Manage Rules menu option to clear conditional formatting rules. Let's remove the Color Scale rule applied to all the Stat values: #excelwithumaer Excel for Data Analysts Select the range C2:H9. Select the Manage Rules option from the Conditional Formatting menu in the Home menu. This box will appear on the right-hand side of your spreadsheet: This will show all the active rules that are applied to the selected range. It will also indicate which cells the rule is applied to. Which, in this example, is C2:H9. #excelwithumaer Excel for Data Analysts Note: In the web browswer version of Excel, the only thing that can be managed is removing the rules. Clicking on the recycling bin icon will remove a particular rule. Now, the cells no longer have conditional formatting. #excelwithumaer Excel For DATA ANALYSTS Day-10 (Excel Charts) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Charts Charts are visual representations of data used to make it more understandable. Commonly used charts are: Pie chart Column chart Line chart Different charts are used for different types of data. Note: Charts are also called graphs and visualizations. The chart above is a column chart representing the number of Pokemons in each generation. Note: In some cases, the data has to be processed before being plotted into a chart. Charts can easily be created in a few steps in Excel. Creating a Chart in Excel Creating a chart, step by step: 1. Select the range A1:A8 #excelwithumaer Excel for Data Analysts 2. Click on the Insert menu, then click on the Line menu ( choose Line ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. You should now get this chart: #excelwithumaer Excel for Data Analysts Excellent! You have now created your first chart. Note: The cells 9 and 10 were not selected in the range, and therefore not included in the graph. Creating Another Chart in Excel Lets compare the stats for the Pokemons; Charmander, Squirtle and Bulbasaur using a column chart. 1. Select the range A1:G4 2. Click on the insert menu, then click on the column menu ( choose Clustered Column ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts You should now get this chart: The chart gives a visual overview for the Pokemons stats. Charmander, represented by the orange bars, and has the highest speed. Squirtle, represented by the gray bars, has the highest defense. Note: The default chart title is "Chart Title". It can be changed. You will learn about chart customization in a later chapter. Excel Bar Charts Bar charts show the data as vertical bars. #excelwithumaer Excel for Data Analysts The chart above represents the number of Pokemons in each generation. Similar to column charts, bar charts are suited for representing values of qualitative (categorical) data. There are three different type of bar charts: Clustered bar( ) Stacked bar( 100% stacked bar( ) ) Clustered Bar Chart Clustered Bar charts are used when the value of data is important but the order is not. Example With One Data Column We want to find the number of generation 1 Pokemons with types "Grass", "Fire", "Water" and "Bug". You can copy the values to follow along: 1. Select the range A1:B5 #excelwithumaer Excel for Data Analysts 2. Click on the insert menu, then click on the bar menu ( choose Clustered Bar ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. Following the steps above will give you the chart below. #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the "Grass", "Fire", "Water" and "Bug" type Pokemons in generation 1. Type "Water" has the most Pokemons in the first generation. Example With Two Data Columns Now let's do the same for generation 2 Pokemons and compare the results with the last example. 1. Select the range A1:C5 #excelwithumaer Excel for Data Analysts 2. Click on the insert menu, then click on the bar menu ( choose Clustered Bar ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the "Grass", "Fire", "Water" and "Bug" type Pokemons in generation 1 and 2. Generation 1 is shown in blue and generation 2 is shown in orange. Type "Water" has the most Pokemons in both generations Also, all the types in generation 2 have less members than generation 1. Excel Stacked Bar Charts Stacked bar charts are used to highlights the total amount of contribution for each category. This is done by stacking the bars at the end of each other. The charts are used when you have more than one data column. #excelwithumaer Excel for Data Analysts Example We want to find out the total number of generation 1 and 2 Pokemons in each of these type 1 categories: "Grass", "Fire", "Water" and "Bug". You can copy the values to follow along: 1. Select the range A1:C5 2. Click on the insert menu, then click on the bar menu ( choose Stacked Bar ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above, you will get the following chart: The chart gives a visual overview for the total number of "Grass", "Fire", "Water" and "Bug" type Pokemons in both generation 1 and 2. Generation 1 Pokemons are shown in blue and generation 2 Pokemons are shown in orange. This chart shows that "Water" type Pokemons are the most common and "Fire" type Pokemons are the least common. 100% Stacked Bar Chart 100% Stacked Bar is used to highlights the proportion of contribution for each data column in a category. This is done by scaling the total value of each category in a stacked bar chart to 100. The charts are used when you have more than one data column. #excelwithumaer Excel for Data Analysts Example We want to find out the proportion of Pokemon types "Grass", "Fire", "Water" and "Bug" in generation 1 and 2. You can copy the values to follow along: 1. Select the range A1:C5 2. Click on the insert menu, then click on the bar menu ( choose 100% Stacked Bar ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above, you will get the following chart: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the proportion of "Grass", "Fire", "Water" and "Bug" type Pokemons in both generation 1 and 2. Generation 1 Pokemons are shown in blue and generation 2 Pokemons are shown in orange. This chart shows that more than half of Pokemons are in generation 1. Excel Column Charts Column charts show the data as vertical bars. Column charts are suited for representing values of qualitative (categorical) data. Excel has three different types of column charts: Clustered column( ) Stacked column( 100% Stacked column( ) ) Clustered Column Chart Clustered Column charts are used when the value of data is important but the order is not. Example With One Data Column We want to find the number of generation 1 Pokemons with types "Grass", "Fire", "Water" and "Bug". You can copy the values to follow along: #excelwithumaer Excel for Data Analysts 1. Select the range A1:B5 2. Click on the insert menu, then click on the column menu ( choose Clustered Column ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above will give you the chart below. The chart gives a visual overview for the "Grass", "Fire", "Water" and "Bug" type Pokemons in generation 1. Type "Water" has the most Pokemons in the first generation. Example With Two Data Columns Now let's do the same for generation 2 Pokemons and compare the results with the last example. 1. Select the range A1:C5 #excelwithumaer Excel for Data Analysts 2. Click on the insert menu, then click on the column menu ( choose Clustered Column ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the "Grass", "Fire", "Water" and "Bug" type Pokemons in generation 1 and 2. Generation 1 is shown in blue and generation 2 is shown in orange. Type "Water" has the most Pokemons in both generations Also, there are more Pokemons in generation 1 than 2. Excel Stacked Column Charts Stacked Column charts are used to highlights the total amount of contribution for each category. This is done by stacking columns on top of each other. The charts are used when you have more than one data column. Example We want to find out the total number of generation 1 and 2 Pokemons in each of these type 1 categories: "Grass", "Fire", "Water" and "Bug". #excelwithumaer Excel for Data Analysts You can copy the values to follow along: 1. Select the range A1:C5 2. Click on the insert menu, then click on the column menu ( choose Clustered Column ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above, you will get the following chart: The chart gives a visual overview for the total number of "Grass", "Fire", "Water" and "Bug" type Pokemons in both generation 1 and 2. Generation 1 Pokemons are shown in blue and generation 2 Pokemons are shown in orange. This chart shows that "Water" type Pokemons are the most common and "Fire" type Pokemons are the least common. 100% Stacked Column Chart 100% Stacked Column is used to highlights the proportion of contribution for each data column in a category. This is done by scaling the total value of each category in a stacked column chart to 100. The charts are used when you have more than one data column. #excelwithumaer Excel for Data Analysts Example We want to find out the proportion of Pokemon types "Grass", "Fire", "Water" and "Bug" in generation 1 and 2. You can copy the values to follow along: 1. Select the range A1:C5 2. Click on the insert menu, then click on the column menu ( choose Clustered Column ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above, you will get the following chart: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the proportion of "Grass", "Fire", "Water" and "Bug" type Pokemons in both generation 1 and 2. Generation 1 Pokemons are shown in blue and generation 2 Pokemons are shown in orange. This chart shows that more than half of Pokemons are in generation 1. Excel Pie Charts Pie charts arrange the data as slices in a circle. Pie charts are used for representing values of qualitative (categorical) data. Pie charts show the contribution of each category to the total. Excel has two types of pie charts: 2-D pie ( Doughnut ( ) ) 2-D Pie Chart Pie charts arrange the data as slices in a circle. 2-D pie charts are used when you only have one data column. Example Showing the proportion of 1st generation Grass, Fire, Water, and Bug type Pokemon. You can copy the values to follow along: 1. Select the range A1:B5 #excelwithumaer Excel for Data Analysts 2. Click on the Insert menu, then click on the Pie menu ( ) and choose Pie ( ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview of the number of 1st generation Grass, Fire, Water, and Bug-type Pokemon. Type "Grass" is shown in blue, "Fire" in orange, "Water" in gray and "Bug" in yellow. Type "Water" has the most Pokemon in the first generation. Note: The chart can be customized by adding labels. This can make it easier to understand the differences between categories. #excelwithumaer Excel for Data Analysts Doughnut Chart Doughnut charts arrange the data as slices in a circle with hollow center. Doughnut charts are often used when you have more than one data column. Note: A doughnut chart with one data column shows the same information as a 2-D pie chart. Example We want to find the proportion of types "Grass", "Fire", "Water" and "Bug". in generation 1 Pokemon and compare it to the proportions in generation 2. You can copy the values to follow along: 1. Select the range A1:C5 2. Click on the Insert menu, then click on the Pie menu ( choose Doughnut ( ) and ) from the drop-down menu Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts Following the steps above, you will get the following chart: #excelwithumaer Excel for Data Analysts The chart gives a visual overview of the number of 1st and 2nd generation Grass, Fire, Water and Bug type Pokemon. Generation 1 Pokemon are shown in the inner circle and generation 2 Pokemon are shown in the outer circle. Type "Grass" is shown in blue, "Fire" in orange, "Water" in gray and "Bug" in yellow. This chart shows that "Water" type Pokemon are the most common in both generations. Note: Based on this chart, you cannot say which generation has more Pokemon. Excel Line Charts Line charts show the data as a continuous line. Line charts are typically used for showing trends over time. In-Line charts, the horizontal axis typically represents time. Line charts are used with data that can be placed in an order, from low to high. Note: Data that can be placed in an order, from low to high, like numbers and letter grades from A to F are called ordinal data. Excel has six types of line charts: Line ( ) Line with Markers ( Stacked Line ( Stacked Line with Markers ( 100% Stacked Line ( 100% Stacked Line with Markers ( ) ) ) ) ) #excelwithumaer Excel for Data Analysts Line Line charts are used for showing data ordered from low to high. Example Let's see the stats change for Bulbasaur evolutions. Copy the values to follow along: 1. Select the range A1:C4 for labels and data Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Line menu ( choose Line ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: The chart gives a visual overview for the Pokemon stats. Bulbasaur evolutions are shown on the horizontal axis. HP stat is shown in blue and Attack stat is shown in orange. The chart shows that with each evolution, the stats increase. Now let's plot more stats on the chart. 1. Select the range A1:D4 for labels and data #excelwithumaer Excel for Data Analysts 2. Click on the Insert menu, then click on Line menu ( ) and choose Line ( ) from the drop-down menu You should get the chart below: #excelwithumaer Excel for Data Analysts Wait a minute. Something doesn't seem right. Suddenly, Bulbasaur's evolutions are not shown on the horizontal axis. Instead, it is the stats. What's happening? Note: Excel checks the number of rows and columns included in the chart and automatically places the larger number on the horizontal axis. Luckily, there is a simple fix. Click on the the chart, then chick on the Chart tab and finally Click on Switch Row/Column. The outcome is this chart which has Bulbasaur evolutions on the horizontal axis. #excelwithumaer Excel for Data Analysts Line with Markers Line with markers highlights data points with markers on a line chart. Example Let's chart the average HP, Attack and Defense over all the Pokemon generations. Copy the values to follow along: Note: This data is rounded to one decimal. 1. Select the range A1:D7 for labels and data Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Line menu ( choose Line with Markers ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for average Pokemon stats over generations. Average HP is shown in blue, average attack is shown in orange and average defense is shown in gray. The horizontal axis shows the generations. This chart shows that the average of all stats in the 2nd generation is very close to each other and 5th generation Pokemon have on average the highest attack. Excel Stacked Line Charts Stacked Line charts show the contribution to trends in the data. This is done by stacking lines on top of each other. Stacked Line charts are used with data that can be placed in an order, from low to high. The charts are used when you have more than one data column which all add up to the total trend. Note: Data that can be placed in an order, from low to high, like numbers and letter grades from A to F are called ordinal data. Example Let's see how the average stats add up across Pokemon generations Copy the values to follow along: Note: This data is rounded to one decimal. 1. Select the range A1:D7 for labels and data Note: This menu is accessed by expanding the ribbon. #excelwithumaer Excel for Data Analysts 2. Click on the Insert menu, then click on the Line menu ( choose Stacked Line ( ) and ) from the drop-down menu You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the average Pokemon stats over generations. The blue line shows the average HP, the orange line show the addition of average HP and Average attack. Finally, the gray line shows the sum of all the stats once all the average stats are added. This chart shows that 4th generation Pokemon have the highest stats on average. #excelwithumaer Excel for Data Analysts Stacked Line with Markers Stacked line with markers highlights data points with markers on a stacked line chart. Example Let's see how the average stats add up across Pokemon generations Copy the values to follow along: Note: This data is rounded to one decimal. 1. Select the range A1:D7 for labels and data Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Line menu ( choose Stacked Line with Markers ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the average Pokemon stats over generations. The blue line shows the average HP, the orange line show the addition of average HP and Average attack. Finally, the gray line shows the sum of all the stats once all the average stats are added. This chart shows that 4th generation Pokemon have the highest stats on average. Excel 100% Stacked Line Charts 100% Stacked Line charts show the proportion of contribution to trends in the data. This is done by scaling the lines so that the total is 100%. 100% Stacked Line charts are used with data which can be placed in an order, from low to high. The charts are used when you have more than one data column which all add up to the total trend. Note: Data which can be placed in an order, from low to high, like numbers and letter grades from A to F are called ordinal data. Example Let's see how the average stats add up across Pokemon generations Copy the values to follow along: Note: This data is rounded to one decimal. 1. Select the range A1:D7 for labels and data #excelwithumaer Excel for Data Analysts Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Line menu ( choose 100% Stacked Line ( ) and ) from the drop-down menu You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the average Pokemon stats over generations. The blue line shows how much the average HP contribute to the overall. The orange line shows how much the average Attack contribute to the total and finally, the gray line shows all the sum of all the stats scaled to 100%. This chart shows that in the second generation, HP contributes more to the overall compared to other generations. 100% Stacked Line with Markers 100% stacked line with markers highlights data points with markers on a 100% stacked line chart. Example Let's see how the average stats add up across Pokemon generations #excelwithumaer Excel for Data Analysts Copy the values to follow along: Note: This data is rounded to one decimal. 1. Select the range A1:D7 for labels and data Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Line menu ( choose 100% Stacked Line with Markers ( ) and ) from the drop-down menu You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the average Pokemon stats over generations. The blue line shows how much the average HP contribute to the overall. The line orange line shows how much the average Attack contribute to the total and finally, the gray line shows all the sum of all the stats scaled to 100%. This chart shows that in the 2nd generation, HP contributes more to the overall compared to other generations. Excel Radar Charts Radar charts show multivariate data as values relative to a center point. Note: Multivariate data has more than one variables. For example, a dataset containing age and height is multivariate because it has two variables. #excelwithumaer Excel for Data Analysts Radar charts can only show data that can be ordered from low to high. Note: Data which can be placed in an order, from low to high, like numbers and letter grades from A to F are called ordinal data. Radar charts are suited for showing similarities and outliers in the data. Note: An outlier is a data point that has unusually large/small values compared to the rest of the data. Excel has three types of radar charts: Radar ( ) Radar with markers ( Filled radar ( ) ) Note: Radar chart is also known as web chart, spider chart and star chart. #excelwithumaer Excel for Data Analysts Radar Radar charts show data as as vertices on a polygon. The relevant distance from the center of the polygon shows the value of the data point. Example Let's compare the stats for Bulbasaur, Charmander and Squirtle. Copy the values to follow along: 1. Select the range A1:G4 Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Other Charts menu ( choose Radar ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the Pokemon stats. Bulbasaur is shown in blue, Charmander in orange and Squirtle in gray. The chart shows that Charmander has the highest speed and lowest special defense. Squirtle has the highest defense and lowest special attack. The three Pokemon have similar HP and attack stats. Radar With Markers Radar with Markers is similar to radar chart. The only difference is that the data points are highlighted with markers. Example Let's compare the stats for Bulbasaur evolutions to Ivysaur and Venusaur. Copy the values to follow along: 1. Select the range A1:G4 Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Other Charts menu ( choose Radar with Markers ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the Pokemon stats. Bulbasaur is shown in blue, Ivysaur in orange and Venusaur in gray. The chart shows that with each evolution, the stats increase in a similar manner. Filled Radar Filled radar is similar to radar chart. The only difference is that inside the charts are filled with color. Example Let's compare the stats for Bulbasaur, Charmander and Squirtle. Copy the values to follow along: 1. Select the range A1:G4 Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Other Charts menu ( choose Radar ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts The chart gives a visual overview for the Pokemon stats. Bulbasaur is shown in blue, Charmander in orange and Squirtle in gray. The chart shows that Charmander has the highest speed. Note that since the charts are overshadowing each other, the chart cannot give any more information. Caution: It's better to avoid using filled radar charts with multiple data columns because some data columns can overshadow others. Example (The Extreme Case) Let's compare the stats for Bulbasaur evolutions to Ivysaur and Venusaur. Copy the values to follow along: 1. Select the range A1:G4 Note: This menu is accessed by expanding the ribbon. 2. Click on the Insert menu, then click on the Other Charts menu ( choose Radar with Markers ( ) and ) from the drop-down menu #excelwithumaer Excel for Data Analysts You should get the chart below: #excelwithumaer Excel for Data Analysts In this chart, Venusaur, which is shown in gray, overshadows all the other Pokemon. The only information this chart gives is that Venusaur has larger or equal stat values than both Bulbasaur and Ivysaur. Excel Area Chart Area charts can be used to plot change over time (years, months and days) or categories and draw attention to the total value across a trend. By showing the sum of the plotted values, an Area chart also shows the relationship of parts to a whole. You can use Area charts to highlight the magnitude of change over time. Step 1 − Arrange the data in columns or rows on the worksheet. Step 2 − Select the data. Step 3 − On the INSERT tab, in the Charts group, click the Area chart icon on the Ribbon. You will see the different types of available Area charts. An Area Chart has the following sub-types − #excelwithumaer Excel for Data Analysts 2-D Area Charts o Area o Stacked Area o 100% Stacked Area 3-D Area Charts o 3-D Area o 3-D Stacked Area o 3-D 100% Stacked Area Step 4 − Point your mouse on each of the icons. A preview of that chart type will be shown on the worksheet. #excelwithumaer Excel for Data Analysts Step 5 − Double-Click the chart type that suits your data. In this chapter, you will understand when each of the Area Chart Types is useful. Area and 3-D Area These chart types are useful to show the trend of values over time or other category data. An Area chart shows the values in 2-D format. A 3-D Area chart shows values in 3-D format. 3-D Area charts use three axes (horizontal, vertical, and depth) that you can change. You can use Area charts − When the category order is important. To highlight the magnitude of change over time. As you can see in the screen shot given above, in a non-Stacked Area chart, the data from one series can be hidden behind the data from another series. In such a case, use a line chart or a stacked area chart. Stacked Area and 3-D Stacked Area Stacked Area charts are useful to show the trend of the contribution of each value over time or other category data in 2-D format. 3-D Stacked Area charts are also useful for the same but they show areas in 3-D format without using a depth axis. #excelwithumaer Excel for Data Analysts You can use Stacked Area charts to − Highlight the magnitude of change over time. Draw attention to the total value across a trend. 100% Stacked Area and 3-D 100% Stacked Area 100% Stacked Area charts are useful to show the trend of the percentage that each value contributes over time or other category data. 100% 3-D Stacked Area charts are also useful for the same, but they show areas in 3-D format without using a depth axis. You can use 100% Stacked Area charts to − #excelwithumaer Excel for Data Analysts Draw attention to the total value across a trend. Highlight the magnitude of change to the percentage that each value contributes over time. Excel Chart Customization Charts in Excel can be customized. Customization can be helpful to make the data easier to understand. For example to highlight key points, give additional information and make it look better. Excel has many options for how to customize a chart. You will learn more about the different options in this chapter. This doughnut chart shows the ratio of different Pokemon types in generations 1 and 2. #excelwithumaer Excel for Data Analysts The "Water" type, shown in gray has the most Pokemons in both generations. Then there are types "Bug", shown in yellow, "Grass", shown in blue and "Fire", shown in orange. Note: Different charts can be customized in different ways. Moving Charts Excel charts can be moved around the spreadsheet. How to move a chart, step by step: 1. Select the chart by clicking on it. Note: Selecting a chart highlights its borders. 2. Drag the chart and place it where you want #excelwithumaer Excel for Data Analysts Resizing Charts Excel charts can be resized. Resizing will scale all the elements in the chart except the text. How to resize a chart, step by step: 1. Select the chart by clicking on it. 2. Click and drag one of the 8 points shown on the chart border and drag them #excelwithumaer Excel for Data Analysts Note: The arrows in the image above are pointing to where you can drag to resize the chart. #excelwithumaer Excel for Data Analysts The chart is now resized. This can be done as many times as needed to get the right size. Changing The Chart Title The default chart title in Excel is "Chart Title". This is not informative. The title should describe the chart. Changing the title, step by step: 1. Double click on the chart This opens up a menu on the right side of your screen. 2. Find "Chart Title" text in the newly opened menu and change it #excelwithumaer Excel for Data Analysts Now, the title has changed to "Pokemon Stats". #excelwithumaer Excel for Data Analysts Note: You can remove the chart title by clicking on it and pressing the Delete key on your keyboard. Customization Options Charts can be customized in different ways, here are some elements you can change: Legends Axis Data labels Grid lines Styling and formatting #excelwithumaer Excel For DATA ANALYSTS Day-11 (Excel Pivot Tables & Charts) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Introduction Excel PivotTable PivotTable PivotTable is a functionality in Excel that helps you organize and analyze data. It lets you add and remove values, perform calculations, and filter and sort data sets. PivotTable helps you structure and organize data to understand large data sets. The data that you use needs to be in tabular format. The tabular form is data in a table format (rows and columns). How a PivotTable Works PivotTables have four main components: 1. Columns Columns are vertical tabular data. The column includes the unique header, which is on the top. The header defines which data you are seeing listed downward. In this example, D5(Sum of Attack) is the header. D6(110), D7(100), D8(50), D9(73), and so on are the data. #excelwithumaer Excel for Data Analysts 2. Rows Rows are horizontal tabular data. Data in the same row are related. In this example, A8(Alakazam) is the Pokemon name. B8(500), C8(55), D8(50), E8(45) represents the pokemons stats. The type of stats is read in the header in the columns. 3. Filters Filters are used to select what data you see. In this example, there are two filters enabled: Generation and Type 1. The filters are set to Generation (1) and Type (Psychic). We will only see Generation 1 Pokemon that is Type 1, Psychic. All Pokemon in the table below the filter are of this generation and type. #excelwithumaer Excel for Data Analysts Filter view: #excelwithumaer Excel for Data Analysts 4. Values Values define how you present the data. You can define how you Summarize and Show values. In this example, values are defined for the range B5:E5. The range B5:E5 has all the same value setting: Sum The Sum is summarized in the range B14:E14. Values settings view: You can change the name and settings of the values. #excelwithumaer Excel for Data Analysts Fields and layout The TablePivot is displayed how by your settings. The PivotTable Fields panel is used to change how you see the data. The settings can be separated into two: Fields and Layout. #excelwithumaer Excel for Data Analysts 1. Fields The checkboxes can be selected or unselected to display or change the property of the data. In this example, the checkbox for Speed is selected. Speed is now displayed in the table. You can click the downward arrow to change how the data is presented. #excelwithumaer Excel for Data Analysts 2. Layout Drag and drop fields to the boxes to the right to display data in the table. You can drag them to the four different boxes that we mentioned earlier (four main components): 1. Filters 2. Rows 3. Columns 4. Values #excelwithumaer Excel for Data Analysts In this example, we will drag and drop Sp. def to Values. Sp. Def is now displayed in the table. #excelwithumaer Excel for Data Analysts The settings of the fields that you have moved to the right side can be changed. Click the downward arrow to access the settings. This is possible in the four areas (Filters, rows, columns, and values). #excelwithumaer Excel for Data Analysts Example: PivotTable is Excel’s premium tool for working with huge data tables and even data stored in other database systems like Access, SQL servers, and MySQL servers. Below is an example of a large data table we will use PivotTable on to do some very relevant quick analysis. It is a table of sales for a particular Pizza Restaurant for a day and it has 5000 entries. So how can we make a report that will show us the sales performance that day by the different types of Pizzas the restaurant sells. A report like the one below: #excelwithumaer Excel for Data Analysts It’s quite easy with Pivot Table. You start by selecting the sales transaction table or selecting one of the cells in it. Then go to the Insert menu and click on Pivot Table. In the screenshot above, I selected one of the cells in the table, clicked on the Insert menu, clicked on PivotTable, confirmed that my entire table has been selected, and clicked on OK. You will be taken to a new sheet that looks like the one below: #excelwithumaer Excel for Data Analysts At first, it looks different, like you are no longer in Excel. But it is very easy to work with. The core part is the part on the right with the name PivotTable Fields. It has a list of all the fields in the original data table. The part below the field names is where you set up your report. Whatever field you want to display its unique entries, one per line/row, you will drag to ROWS. Let’s do that for the Pizza Sold field so we will be able to see all the pizza types the restaurant sells. #excelwithumaer Excel for Data Analysts Then if it is that you want to display those unique entries one per column, drag the field to COLUMNS. Let’s see what will happen if we drag that Pizza Sold field from ROWS to COLUMNS. So now you understand how ROWS and COLUMNS work. Drag Pizza Sold back to ROWS, that is where we need it for our quick analysis. Next is VALUES. Whatever you want to do a mathematical calculation on, you drag to the VALUES part. Common calculations you will find yourself doing are counts (to see the number of times each unique entry occurred in the original table), sum (to add the values of a particular field), and average (to average the values of a particular field). In our case, let’s drag the Quantity and Amount Sold fields to VALUES. #excelwithumaer Excel for Data Analysts We have just analyzed a 5000 sales record table in seconds. Now we have a report that shows us how many of each Pizza type were sold and the total sales amount generated. Those are the type of lightning-fast analyses PivotTable allows you to do. There is now one part we haven’t touched: FILTERS. As the name suggests, it simply gives us the capability to filter our report. We will drag Time Range to FILTERS to see which sales occurred at the peak period (before 9:00 am) and after the peak period. #excelwithumaer Excel for Data Analysts And that’s how PivotTable works. Very easy to use and powerful. PivotChart Whenever you insert a chart using data generated via a PivotTable, that chart is a PivotChart. It has some extra functionalities it inherits from the PivotTable which makes it a little different from the regular charts we have already discussed. Below is the PivotChart for the PivotTable we just created. Notice the extra elements on it. Even the Time Range filter is showing on the chart. Besides those extra elements, a PivotChart is the same as the regular charts and the same kind of formatting you can do on the regular charts work on Pivot Charts. #excelwithumaer Excel For DATA ANALYSTS Day-12 (Excel What-If Analysis) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts What-If Analysis in Excel What-If Analysis in Excel allows us to try out different values (scenarios) for formulas. The following example helps you master what-if analysis quickly and easily. Assume you own a bookstore and have 100 books in storage. You sell a certain % for the highest price of $50 and a certain % for the lower price of $20. If you sell 60% for the highest price, cell D10 calculates a total profit of 60 * $50 + 40 * $20 = $3800. Create Different Scenarios But what if you sell 70% for the highest price? And what if you sell 80% for the highest price? Or 90%, or even 100%? Each different percentage is a different scenario. You can use the Scenario Manager to create these scenarios. Note: You can simply type in a different percentage into cell C4 to see the corresponding result of a scenario in cell D10. However, what-if analysis enables you to easily compare the results of different scenarios. Read on. 1. On the Data tab, in the Forecast group, click What-If Analysis. 2. Click Scenario Manager. #excelwithumaer Excel for Data Analysts The Scenario Manager dialog box appears. 3. Add a scenario by clicking on Add. 4. Type a name (60% highest), select cell C4 (% sold for the highest price) for the Changing cells, and click on OK. #excelwithumaer Excel for Data Analysts 5. Enter the corresponding value 0.6 and click on OK again. 6. Next, add 4 other scenarios (70%, 80%, 90%, and 100%). Finally, your Scenario Manager should be consistent with the picture below: Note: to see the result of a scenario, select the scenario and click on the Show button. Excel will change the value of cell C4 accordingly for you to see the corresponding result on the sheet. Scenario Summary To easily compare the results of these scenarios, execute the following steps. 1. Click the Summary button in the Scenario Manager. 2. Next, select cell D10 (total profit) for the result cell and click on OK. #excelwithumaer Excel for Data Analysts Result: Conclusion: if you sell 70% for the highest price, you obtain a total profit of $4100, if you sell 80% for the highest price, you obtain a total profit of $4400, etc. That's how easy what-if analysis in Excel can be. Goal Seek What if you want to know how many books you need to sell for the highest price, to obtain a total profit of exactly $4700? You can use Excel's Goal Seek feature to find the answer. 1. On the Data tab, in the Forecast group, click What-If Analysis. 2. Click Goal Seek. The Goal Seek dialog box appears. #excelwithumaer Excel for Data Analysts 3. Select cell D10. 4. Click in the 'To value' box and type 4700. 5. Click in the 'By changing cell' box and select cell C4. 6. Click OK. Result. You need to sell 90% of the books for the highest price to obtain a total profit of exactly $4700. Goal Seek If you know the result you want from a formula, use Goal Seek in Excel to find the input value that produces this formula result. Goal Seek Example 1 Use Goal Seek in Excel to find the grade on the fourth exam that produces a final grade of 70. 1. The formula in cell B7 calculates the final grade. #excelwithumaer Excel for Data Analysts 2. The grade on the fourth exam in cell B5 is the input cell. 3. On the Data tab, in the Forecast group, click What-If Analysis. 4. Click Goal Seek. The Goal Seek dialog box appears. 5. Select cell B7. 6. Click in the 'To value' box and type 70. 7. Click in the 'By changing cell' box and select cell B5. #excelwithumaer Excel for Data Analysts 8. Click OK. Result. A grade of 90 on the fourth exam produces a final grade of 70. Goal Seek Example 2 Use Goal Seek in Excel to find the loan amount that produces a monthly payment of $1500. 1. The formula in cell B5 calculates the monthly payment. The PMT function calculates the payment for a loan. If you've never heard of this function before, that's OK. The higher the loan amount, the higher the monthly payment. Assume, you can only afford $1500 a month. What is your maximum loan amount? #excelwithumaer Excel for Data Analysts 2. The loan amount in cell B3 is the input cell. 3. On the Data tab, in the Forecast group, click What-If Analysis. 4. Click Goal Seek. The Goal Seek dialog box appears. 5. Select cell B5. 6. Click in the 'To value' box and type -1500 (negative, you are paying out money). 7. Click in the 'By changing cell' box and select cell B3. 8. Click OK. Result. A loan amount of $250,187 produces a monthly payment of $1500. #excelwithumaer Excel for Data Analysts Goal Seek Precision Goal seeks returns approximate solutions. You can change the iteration settings in Excel to find a more precise solution. 1. The formula in cell B1 calculates the square of the value in cell A1. 2. Use goal seek to find the input value that produces a formula result of 25. Result. Excel returns an approximate solution. 3. On the File tab, click Options, Formulas. 4. Under the Calculation options, decrease the Maximum Change value by inserting some zeros. The default value is 0.001. #excelwithumaer Excel for Data Analysts 5. Click OK. 6. Use Goal Seek again. Excel returns a more precise solution. Data Tables Instead of creating different scenarios, you can create a data table to quickly try out different values for formulas. You can create a one-variable data table or a two-variable data table. Assume you own a bookstore and have 100 books in storage. You sell a certain % for the highest price of $50 and a certain % for the lower price of $20. If you sell 60% for the highest price, cell D10 below calculates a total profit of 60 * $50 + 40 * $20 = $3800. #excelwithumaer Excel for Data Analysts One Variable Data Table To create a one-variable data table, execute the following steps. 1. Select cell B12 and type =D10 (refer to the total profit cell). 2. Type the different percentages in column A. 3. Select the range A12:B17. We are going to calculate the total profit if you sell 60% for the highest price, 70% for the highest price, etc. 4. On the Data tab, in the Forecast group, click What-If Analysis. 5. Click Data Table. #excelwithumaer Excel for Data Analysts 6. Click in the 'Column input cell' box (the percentages are in a column) and select cell C4. We select cell C4 because the percentages refer to cell C4 (% sold for the highest price). Together with the formula in cell B12, Excel now knows that it should replace cell C4 with 60% to calculate the total profit, replace cell C4 with 70% to calculate the total profit, etc. Note: this is a one-variable data table so we leave the Row input cell blank. 7. Click OK. Result. #excelwithumaer Excel for Data Analysts Conclusion: if you sell 60% for the highest price, you obtain a total profit of $3800, if you sell 70% for the highest price, you obtain a total profit of $4100, etc. Note: the formula bar indicates that the cells contain an array formula. Therefore, you cannot delete a single result. To delete the results, select the range B13:B17 and press Delete. Two-Variable Data Table To create a two-variable data table, execute the following steps. 1. Select cell A12 and type =D10 (refer to the total profit cell). 2. Type the different unit profits (the highest price) in row 12. 3. Type the different percentages in column A. 4. Select the range A12:D17. We are going to calculate the total profit for the different combinations of 'unit profit (the highest price)' and '% sold for the highest price'. 5. On the Data tab, in the Forecast group, click What-If Analysis. #excelwithumaer Excel for Data Analysts 6. Click Data Table. 7. Click in the 'Row input cell' box (the unit profits are in a row) and select cell D7. 8. Click in the 'Column input cell' box (the percentages are in a column) and select cell C4. We select cell D7 because the unit profits refer to cell D7. We select cell C4 because the percentages refer to cell C4. Together with the formula in cell A12, Excel now knows that it should replace cell D7 with $50 and cell C4 with 60% to calculate the total profit, replace cell D7 with $50 and cell C4 with 70% to calculate the total profit, etc. 9. Click OK. Result. #excelwithumaer Excel for Data Analysts Conclusion: If you sell 60% for the highest price, at a unit profit of $50, you obtain a total profit of $3800, if you sell 80% for the highest price, at a unit profit of $60, you obtain a total profit of $5200, etc. Note: The formula bar indicates that the cells contain an array formula. Therefore, you cannot delete a single result. To delete the results, select the range B13:D17 and press Delete. #excelwithumaer Excel For DATA ANALYSTS Day-13 (Excel Keyboard Shortcuts) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Keyboard Shortcuts Most Useful Excel Keyboard Shortcuts In this overview, you can find the functionalities and key combinations of the most useful Excel keyboard shortcuts. Use keyboard shortcuts to speed up your workflow on Excel. Note: Keyboard shortcuts have slight differences depending on the platform. Description Windows Mac OS Copy Ctrl + C Command + C or Ctrl + C Paste Ctrl + V Command + V or Ctrl + V Cut Ctrl + X Command + X or Ctrl + X Undo Ctrl + Z Command + Z or Ctrl + Z Redo Ctrl + Y Delete Command + Y or Ctrl + Y or Command + Shift + Z Delete Ctrl + B Command + B or Ctrl + B Italic Ctrl + I Command + I or Ctrl + I Underline Ctrl + U Command + U or Ctrl + U Fill cells down Ctrl + D Command + D or Ctrl + D Fill cells right Ctrl + R Command + R or Ctrl + R Insert cells Ctrl + Shift + Equal sign (=) Delete cells Ctrl + Shift + Plus sign (+) Ctrl + Hyphen (-) Save Ctrl + S Command + Hyphen (-) or Ctrl + Hyphen (-) Command + S or Ctrl + S Save As F12 Command + Shift + S or F12 Print Ctrl + P Command + P or Ctrl + P Close Window Ctrl + W or Ctrl + F4 Command + W or Ctrl + W Quit Excel Alt + F4 Remove Cell Contents Bold Command + Q #excelwithumaer Excel for Data Analysts Move and Scroll using Keyboard Shortcuts This is an overview of key combinations used to navigate within an Excel workbook. Note: Keyboard shortcuts have slight differences depending on the platform. Description Windows Mac OS Navigation between cells Arrow keys Arrow keys Navigation between unlocked cells on a protected sheet Horizontal Scrolling Tab key Tab key Shift + scroll the mouse wheel up for left and down for right Access Go To Shift + scroll the mouse wheel up for left and down for right Alt + G Access Find Alt + F Ctrl + F or Shift + F5 Access search while in a cell Ctrl + F Command + F Move to the edge of the selected data region Ctrl + Arrow key Command + Arrow key Move to the start of a row Alt + H Home or Fn + Left arrow key Move to the start of the sheet Ctrl + Home Ctrl + Home or Ctrl + Fn + Left arrow key Move to the last used cell on the sheet Ctrl + End Ctrl + End or Ctrl + Fn + Right arrow key Navigate one screen down Page down Page down or Fn + Down arrow key Navigate one screen up Page up Page up or Fn + Up arrow key Navigate one screen to the right Alt + Page down Alt + Page down or Fn + Alt + Down arrow key Navigate one screen to the left Navigate to the next sheet Alt + Page up Alt + Page up or Fn + Alt + Up arrow key Ctrl + Page up or Alt + Right arrow key Navigate the previous sheet Ctrl + Page up Ctrl + Page down or Alt + Left arrow key Scroll to the active cell Shift + Tab Ctrl + Delete Ctrl + Page down Ctrl + G #excelwithumaer Excel For DATA ANALYSTS Day-14 (Excel Interview Questions) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Excel Concepts Tested in Data Analyst Interviews In order to establish why Excel is so useful, it is helpful to think of the teams you may work or be embedded with. The finance department of a company is an excellent example. Establishing plans and testing models for this team puts you in a position of deciding on crucial financial decisions for the company itself. That is why a successful data analyst should focus on learning and improving their financial reporting, forecasting and strategizing, which is where knowing important Excel functions and tools comes in handy. You may very well work with other functions of a business like sales or customer success (retention), and the following tools will also be a huge asset for their planning as well: Pivot Tables Pivot tables are perhaps one of the tools that will save you the most time in Excel. It is capable of summarizing and analyzing data in a matter of seconds. And regardless of the size of the data itself, it will provide you with a summary of it, with the ability to quickly update when new data is inputted. With these advantages, the pivot table can be one of the best ‘friends’ of data analysts who use Microsoft Excel regularly. Charts Charts are the essential way for you to present your data. Everyone can turn in pages upon pages of numbers. And sometimes that kind of presentation is required or requested as well. More often however, the detailed and customizable Charts section in Excel is going to help you create graphics that both convey data and tell a better story. Common charts include: Column Chart Line Chart Pie Chart (2-D and 3-D) Doughnut Chart Bar Chart Area Chart #excelwithumaer Excel for Data Analysts Calculated Items Calculated items work as custom formulas that use the sum of different items. The sum of different items is calculated and put into a pivot field. It can be looked at almost as a supportive feature of Pivot Tables. Conditional Formatting This feature also goes well when you are presenting your final results to a group. It helps you differentiate categories of data cells from each other. You can highlight, emphasize and change the format of the cells, often by adding cell color based on the cell contents. As a business analyst, you are going to deal with numbers constantly. Therefore, presenting them in a more fashionable way will help everyone to realize and understand what they are looking at easily. Basic Excel Questions for Data Analysts It is crucial that you know Excel in today’s times, especially when you have to work with data. A data analyst has to know a number of tools, and Excel is one of the basic ones on that list. There are plenty of other tools that can work with large datasets, but it is Excel where most analysis starts, before increasing in complexity. Some questions you need to know how to solve in Excel at a basic level are: 1. What are the common data formats in Microsoft Excel? Excel can accommodate a number of basic and advanced data formats. Some of the most common ones are numbers, percentages, dates, and text. 2. How are data formats used in Excel? There are many ways in which one can use data formats in Excel. For example, numbers can be used as decimals or rounded figures, percentages can be used to show part of a whole (the whole being 100%), dates can be changed depending on the region and location that Excel is connected to, and text can be used to analyze data and reports imported from other spreadsheets. These formats are often used in conjunction with one another when doing more advanced coding and manipulation, which we will cover further in the article (for example, multiplying a number by a percentage). 3. What is a spreadsheet and what are its fundamental components? #excelwithumaer Excel for Data Analysts A spreadsheet in Microsoft Excel is made up of cells organized into rows and columns. Information is inputted into the cells in order to organize, display and manipulate data. For example, a spreadsheet can contain the names of a list of products, the price per unit, and the number of units sold. This enables the viewer to read and search through this list and make calculations for what data needs to be analyzed. 4. In how many formats can Microsoft Excel export data? There are a total of six formats in which data can be exported. They are: 1. Excel workbook: .xlsx 2. Excel macro-enabled workbook: .xlsm 3. Excel binary workbook: .xlsb 4. Template: .xltx 5. Template (code): .xltm 6. XML data: .xml Choosing which format to export it may be dependent on the team that needs the file or constraints on how large a file can be for its end destination. 5. How can you wrap the text within a cell? Wrapping text is useful for data presentation and keeping your sheet clean. You must select the text you want to wrap, click wrap text from the home tab, and you will see the text wrap within a cell. 6. What is a Ribbon in Excel? A Ribbon refers to the topmost area of the application that contains menu items and toolbars available in MS Excel. Ribbons can be shown/hidden using CTRL+F1. The ribbon runs on the top of the application and acts as a replacement for the toolbars and menu dropdowns that can be hard to navigate without lots of muscle memory. The ribbons have various tabs on the top, and upon clicking on it you can see a group of commands which you can use without having to re-navigate to the tab header. Additionally, hovering over ribbon commands will show you the hotkey combination to perform that function, so that you can memorize some of the functions you use most often. #excelwithumaer Excel for Data Analysts 7. What order of operations do you use when evaluating formulas in Excel? In other words, in what order will Excel formulas process the inputted code? The same as you use in mathematics which is defined by the term “PEMDAS” or “BEDMAS”. This stands for: Parentheses or Brackets Exponent Multiplication Division Addition Subtraction 8. What are cells In Excel? Each worksheet on Microsoft Excel is comprised of multiple rows and columns. The points where the rows and columns intersect form a rectangle, which is also known as a cell. 9. What is a cell address and how is it denoted in Excel? The cell address is a unique identification value given to every cell on an Excel sheet to make it easier to find data present on the document. The cell address is denoted by the respective column letter and corresponding row number for the cell. The notation is simple, A1 is the left uppermost cell in a spreadsheet, and other cells count outwards from there. 10. How do you delete unwanted sheets in your Excel workbook? Right click on the bottom sheet tab of the sheet that you wish to delete. The right click will bring up a menu of options, one of which is delete. Selecting delete will activate a prompt that asks if you are ready to permanently delete the sheet; make sure you have a saved version or really are positive you will no longer need the information contained within. 11. Can you add annotations to a cell in your Excel workbook? If yes, how? You can annotate a cell in excel using multiple techniques like utilizing colors, callouts, and cell comments. 12. What are cell references? #excelwithumaer Excel for Data Analysts Cell references are used to refer to data located in the same Excel spreadsheet but to data in a different cell. This becomes useful when building custom formulas that rely on data from different locations within the same sheet or from a different sheet. 13. How do you insert a comment into an Excel spreadsheet? To add a comment to a sheet, right click on the sheet you want to add the comment to and choose insert comment from the menu. Type your comment in the comment area provided. Cell comments are directly linked to specific cells and are indicated by a red triangle in the corner of a cell. To see the comment, simply hover over the cell with your mouse. 14. Can you protect your data in Excel? If so, how? There are three ways in which you can do this, and they are: Setting passwords to open the workbook. Adding, removing or hiding sheets (make sure you have reviewed how to unhide the sheet for future reference). Protecting the sheet from the alteration of window sizes or positions. 15. How many cell formats are possible in Microsoft Excel? Microsoft Excel 2003 can handle 4,000 different cell format combinations, and Excel 2007 and later can handle 64,000. Any unique combination of formats counts towards this number: for example, one cell formatted with Arial font and pink fill color, and another cell with Arial font and blue fill color, would count as two different combinations. 16. How do you change the formatting of a cell in Excel? The default font of all cell content in a workbook is Calibri (in black). However, this can be changed by selecting any cell and clicking the Font drop-down menu on the Home tab. You can change the font, size and color and make your text bold, italic or underlined. Other options available to you include: - Cell Fill colors. - Cell Borders. - Cell styles. - Auto number formatting (adding currency symbols, percentage symbols, etc). - Alignment. - Auto text formatting (changing the appearance of dates and times etc). 17. What does the red triangle in the upper right corner of a cell denote? A red triangle in the upper right corner of a cell indicates that a cell comment has been attached to this cell. If you hover over the cell with your cursor, the #excelwithumaer Excel for Data Analysts comment will be displayed. Check back to “How do you insert a comment” above to review that process. 18. What does an Absolute Cell Reference accomplish in Excel? Absolute cell referencing is the exact opposite of relative cell referencing. By marking the row number and column letter with a $ symbol (e.g. $A$1), you can make a cell reference fixed (or “absolute”). This means that when you copy and paste it to another cell or use AutoFill, the cell references will not change. 19. What is the function of the dollar sign ($) in Microsoft Excel? When you insert the dollar sign, it tells a cell in Excel whether to change the location of the reference or not, if the formula for it is copied to other cells. You can also make only the row or column absolute ($A1, or A$1), in order to allow a portion of a reference to be updated when pasting or AutoFilling. 20. What is the shortcut to the Data Filter on Excel? The shortcut to turn filters on or off is Ctrl+Shift+L. To display the filter dropdown menu, the shortcut is Alt+Down Arrow 21. What is the difference between a function and a formula in Excel? Formulas are written instructions for a calculation in Excel. All calculations within a spreadsheet will be written as formulas (e.g. =C3+C4+C5+C7+C8). On the other hand, functions are prewritten formulas and a feature of Excel. Excel has over 500 built-in functions that allow users to achieve complicated calculations without having to create the formula themselves, or type it out in full. 22. How do you clear the cell formatting without removing text? You need to go to the Home tab, click the Clear button and then select the option for Clear Formats. Any formatting done on the cell will be removed without affecting content. 23. How do you enter the current date and time on an Excel sheet? =NOW() function will return the current date and time. If you just want to enter the current time, but not date, use the keyboard shortcut Ctrl+Shift+semicolon key, and for the current date without time, press Ctrl+Semicolon. #excelwithumaer Excel for Data Analysts 24. What is a Dashboard? A dashboard is used to present important information through graphical representation. It is helpful in presenting huge data on a single computer screen so it can be reviewed with a glance, and useful insights can be inferred from it. Often a dashboard will utilize color coded gauges to show if metrics are within desired parameters or if a deeper dive is needed on a specific topic. 25. How do you split information in a column into two or more columns? The text to column option in the Data tab could be used to split the original column into two or more columns. You can split by number of characters, or by delimiting (looking for a certain indicator). A common example is separating the cell FirstLastName (Susan Crabapple) into a First Name (Susan) and Last Name (Crabapple). By delimiting based on the space, you could separate a whole range of names into their component parts. Intermediate Excel Questions for Data Analysts Explaining data succinctly is part of the job, but explaining the software and tools that data analysts use definitely is not, and not everyone is naturally gifted in this area. This means that you need to be prepared for any kind of question that the interviewer may ask, and can show your additional capabilities by articulating what other interviewees may not be able to. As the interview progresses, the questions can get tougher depending on how well you know the software. If you have experience in data analytics, you can expect questions on functions and other tasks that you can carry out in Microsoft Excel, such as writing SQL Queries within Excel. 26. What is an Excel chart, and how many types of charts are there? A chart in Excel is a feature that allows you to display data through a range of visually intuitive graphs. These charts and graphs can make it easier and quicker to comprehend data, in comparison to just looking at the numbers on the worksheet. Available charts in Excel include: Bar graphs Line graphs Pie charts #excelwithumaer Excel for Data Analysts Area graph Scatter graphs Surface graphs Doughnut graphs Radar charts Each of these charts has its advantages and disadvantages, based on the story you wish to tell your audience. Make sure you have a reason for choosing a specific chart, and that it is not emotional or random. 27. What is a Macro in Microsoft Excel? A macro is a sequence of performable actions in Excel that have been recorded, saved, and named for easy use in the future. A macro can then be called on whenever necessary to complete the sequence of actions without the user having to replicate each step manually. This saves valuable time and effort when performing repetitive tasks with larger sets of data. You might, for example, need to manipulate a data set in the same way every week, but it involves 15 steps to complete. By recording a macro, you can manipulate the data in a consistent way extremely quickly, with just a click of a button. 28. How do you standardize the formatting in the sheets of a workbook? Formatting will automatically be copied to all selected sheets, so to apply a single format to all the sheets in a workbook, simply hold down Ctrl (or Cmd on Mac) to select every sheet. Only formatting edits will be copied over with this method, not data. 29. What is a relative cell address? A relative cell address (or relative cell reference) is a cell address within a formula that does not include a $ symbol before the row number or column letter. This means that when the formula is copied one column over, the cell address will change accordingly. The formula will calculate relative to its position, rather than displaying the calculation from the original position. This is why making formulas with absolute cell references is so important, as you often do not want your equations to roll forward automatically. #excelwithumaer Excel for Data Analysts 30. What is a drop-down list? A drop-down list allows the creator of a spreadsheet to control the data inputted into certain cells. In other words, when the creator only wants one of four predetermined options to be used, instead of relying on potentially unreliable user inputs (misspellings, non-standard categories), they can ensure it is adhered to by having the users click an option from a drop-down list. Good inputs equal good outputs, and reducing the opportunities for manual entry will allow for better analysis down the line. 31. How do you use the Name Box function? The Name Box is an input box above the Excel sheet, to the left of the formula bar. Its default mode displays the address of the currently selected cell, but it has other uses too. Firstly, the Name Box can be used to quickly select a specific cell or range of cells: typing in a cell reference like G8 will automatically navigate to cell G8, and typing in a range of cells like G8:G30 will select all cells within that range. Secondly, the Name Box can be used to create a named range, and then can be used as a drop-down menu to navigate between your assorted named ranges. 32. What is the LOOKUP function in Microsoft Excel? The LOOKUP function allows the user to find exact or partial matches in the spreadsheet. The VLOOKUP option lets the user search for data located in the vertical position. The HLOOKUP option functions in the same way but in the horizontal plane. 33. Can you use multiple data formats in Pivot Tables? Data can be imported from a variety of sources by selecting the Data tab and clicking Get External Data > From Other Sources. Excel worksheet data, data feeds, text files, and other such data formats can be imported, but you will need to create relationships between the imported tables and those in your worksheet before using them to create a pivot table. 34. How do you create a hyperlink in Excel? To create a link in Excel, select the element you wish to use as the anchor (this can be a cell or an object like a picture). You can then use a variety of pathways: select Link from the Insert tab, right-click and select Link on the menu, or press #excelwithumaer Excel for Data Analysts Ctrl+K. This will bring up a series of options that will allow you to indicate what kind of content you would like to link to, such as a file, a web page, a specific location, or an email address. 35. How do you find the day of the week for a particular date in an Excel sheet? You can do this by using the WEEKDAY function. First, enter the formula in the required cell, WEEKDAY(A1,1). The second argument (1) determines to what day Excel will assign the value. Press Enter, and the Formula will return 3, meaning that your date is the 3rd day of the week. 36. What are the benefits of using the SHEET formula? When working in a massive workbook with many sheet tabs, it can be helpful to know that you are looking at the correct sheet and not missing any hidden tabs. The SHEET formula returns the number of the sheet you are in, such that the second sheet tab would return a value of 2. This is beneficial as an organizational tool. 37. How do you build a Pivot Table? Click on the Data tab in the ribbon section. Then, click the Data Validation button in the Data Tools group Navigate to Configurations>Allow>List Select an array for the source list 38. What is the default value of the last parameter of the VLOOKUP function? If the last parameter is not specified via TRUE or FALSE, the return value will default to TRUE (approximate), and show an approximate match for your request. This is usually not what you are looking to accomplish, as the typical use case for VLOOKUP is to find an exact match. 39. How do you refresh a Pivot Table? There are several methods to refresh a pivot table without making a new one from scratch: 1. Click the pivot table, select Analyze, and then select Refresh from the pivot table tools menu. #excelwithumaer Excel for Data Analysts 2. Right-click the pivot table and select Refresh. 3. Use the keyboard shortcut Alt+F5. You can also refresh all pivot tables within a workbook at once by selecting the arrow underneath the Refresh button in the pivot table tools menu, and selecting Refresh All. 40. What is the most common error message in Excel? The most common error message in Excel is the #### error message, which is displayed when a cell is not large enough to display all the data that has been inputted into it. To solve this error message, simply drag the cell to increase its width or depth. Other common errors include #VALUE! , which results when a portion of the data you are trying to analyze has a different format than the rest, or #NAME! , when the formula was written incorrectly and is not processing as it should. 41. How do you find duplicate values in a column in Excel? To find but not delete duplicates in a column, select the target range of data and navigate to the Style group on the Home tab. Here, click the arrow next to Conditional Formatting. You will then be able to choose Highlight Cell Rules, Duplicate Values, and enter the values you wish to find duplicates of. This will highlight duplicates of the values you entered, but will not manipulate the data within. 42. What are Macro languages in Excel? Macros for Excel are written in VBA (Visual Basic for Applications). You can use VBA to manually type out actions for a macro yourself, or you can “record” actions using the Macro Recorder in Excel, and the software will convert these to VBA code for you. Once you become stronger in VBA, you can review recorded macros and perform the updates yourself to tweak your use cases. 43. How do you extract unique values in Excel? You can find unique values by selecting the desired range of data and navigating to Data > Sort & Filter > Advanced. To permanently delete duplicate values and create a list of unique values only, click Data > Data Tools > Remove Duplicates. #excelwithumaer Excel for Data Analysts 44. How do you create Cross-Tabulation in Excel? The product of the pivot table feature in Excel is often referred to in other software as a contingency table or cross-tabulation. To create a “crosstab” use the PivotTable option on the Insert tab. 45. What is Freeze Panes? The Freeze Pane function in Excel serves to lock rows or columns of a sheet so that they are always visible. This can be found on the View Tab of the ribbon. This is often helpful when you want to keep the headers of columns in view, or perhaps the identifier of a row while scrolling right. Hard Excel Questions for Data Analysts No matter what position you work in, no matter which company you work for, if you are unable to solve the problems you face, you will not be successful. That means you have to be good at identifying the problems themselves. Then you have to consider which ones can be or should be solved. After your evaluations, you can create solutions to challenges for both the organization and you as a data analyst. By being able to answer difficult questions on Excel, and knowing how to navigate these issues, you will find your job as a data analyst much easier. These harder questions about Excel include data analysis, sorting, and other hard functions. 46. What is conditional formatting? Conditional formatting is a method that allows us to identify the characteristics (conditions) of a cell’s contents that are of interest to us, and superimpose highlighting of cells or ranges that meet that criteria. When a cell is updated with new information, the conditional formatting will recognize and update itself. For instance, if you wanted to apply a green highlight to any cell that contains the letter Z, and you update Randolph to Ziggy, the conditional format would automatically apply. 47. What is the limitation of the VLOOKUP function? The VLOOKUP function can only move in one direction, from left to right. Therefore, the information you wish to seek out must be located in a column to the right of the lookup value’s location. In newer versions of Excel, a successor #excelwithumaer Excel for Data Analysts to VLOOKUP has been added, called XLOOKUP. This new function works in any direction and defaults to exact matches rather than approximate. At some point in the future, XLOOKUP will completely replace VLOOKUP, but this will not happen until the majority of users have moved away from using older versions of Excel. 48. Does VLOOKUP use case sensitive values? VLOOKUP is not case-sensitive, and will always return the first value of the match irrespective of the case. In other words, the name Apgar and the acronym APGAR would be viewed as the same by VLOOKUP. It is, however, possible to manipulate VLOOKUP into returning case-sensitive values by using a helper column, or by sorting your data in an ascending or descending order so that the value you want is always the first to be encountered by VLOOKUP. 49. How do the INDEX and MATCH functions work in Excel? You can use two MATCH functions within an INDEX formula to specify a cell reference and return the value of that cell. The dynamic formula will return the corresponding data of any two MATCH values you input. For example, if you have a table detailing the price per unit and the number of units sold for a variety of products, you can use the match index function to return a specific piece of information about a specific product. 50. What is the difference between COUNT, COUNTA, COUNTBLANK and COUNTIF functions? COUNT: This function counts how many cells within a specified range contain numerical data. It will ignore (not count) any cells that are blank or contain text or symbols only. COUNTA: This function counts how many cells within a specified range contain data of any type (the cell is filled). It will count all cells that are not blank. COUNTBLANK: This function will count the number of blank cells within the designated range. COUNTIF: This function will count only the cells whose value meets a certain condition specified by the user. #excelwithumaer Excel for Data Analysts 51. What is Data Validation? Data Validation limits the type of values that can be inserted into a single cell or a set of cells by a user. It again works to limit user input errors and keep the data inputs clean. 52. How can you measure an Excel percentage? Select the destination cell to display the percentage Then, type a “=” sign. Type in your reference, say A1/ A2, then hit the Enter key. Click on the Home tab, and select the % symbol from the numbers group. This converts the value into a percentage format. 53. Can you build Excel feature shortcuts? Yes. It is possible to configure the ‘Easy Access Toolbar’ above the home button to display your most commonly used shortcuts. 54. What are the alignments for Left, Right, Fill, and Distributed? The left/right alignment aligns the cell’s contents to the left and right. Fill the cell with the same text repetitively, as the name suggests. Distributed spreads the text over the cell width. 55. How do you use Advanced Filters? You can extract a unique list of items using Advanced Filters, or you can also extract a particular item from various worksheets. It may be assumed that the Advanced Filter is an advanced Auto Filter variant. 56. What is an Excel Array formula? With an array, a user can perform multiple calculations on multiple items using just one formula. For instance, if you want to multiply A1 by B1, A2 by B2, A3 by B3, and so on, instead of writing a formula for each calculation, you can write =A1:A10*B1:B10 in cell C1, and the results for each calculation will spill down the C column. This is called a multi-cell array, as the results will be stored in multiple cells. You can also create a single-cell array if, for example, you wanted to sum the #excelwithumaer Excel for Data Analysts entirety of the values calculated by the above array. This would look like: =SUM(A1:A10*B1:B10) and return a single value calculated by adding the results of all ten multiplications together. 57. How do you extract the first name from a full name in Excel? The FIND function will return the numerical location of this target (with the first character of the text being 1). The LEFT function can then extract the number of characters specified by the FIND function from the beginning of the text (i.e. the left). However, the value returned by FIND will include the space itself, so we need to subtract 1 from the value in order to find the actual ending point of the first name. The formula would look like this:=LEFT(A1,FIND(“ ”,A1)-1). A second method would separate the first names and last names and deposit them into separate new columns, using the Text to Columns feature found in the Data tab. We covered this earlier under how to split information in a column. The Text to Columns dialogue box will allow you to select the delimiter separating each field (e.g. space) and show you a preview of the result. The last step will allow you to choose where you want the result to be displayed. 58. What is the difference between a function and a subroutine in VBA? It is the duty of a function to return the value of the mission it performs. Subroutines, meanwhile, do not return the importance of the assignment they perform. Functions are used as formulas, as they are in spreadsheets. Subroutines are not used as formulas directly inside spreadsheets. 59. What’s the distinction in VBA between this workbook and the active workbook? The name of the workbook from which the code is running is provided by This Workbook. Active Workbook is as the name implies, the workbook that is actually active in the numerous open workbooks. 60. What is the easy way to go back to a specific area of a worksheet? Using the name box is a fast way to return to a particular section of the worksheet. To return to a particular area of a worksheet, you can type the cell address or name of the range in the name box. #excelwithumaer Excel For DATA ANALYSTS Day-15 (Excel Quick Guide) BY MOHAMMED UMAER DATA ANALYST Excel for Data Analysts Quick Guide Excel Important Concepts to Glance on Before Interviews and Revision 10 FORMULAS Formulas make Excel smart. Without them, Excel is simple data-keeping software. Once you unleash formulas on your data, you can do magic. But Excel has hundreds of formulas, so which ones to learn first? In this chapter, I present the ten most important formulas for you. Master these and you will be able to answer most business analysis questions quickly. I am assuming that you are familiar with simple formulas like IF, SUM, COUNT, AVERAGE, etc. So, in this section, we will only focus on intermediate to advanced formula concepts. 1. Tables & Structural References 2. IFS 3. SUMIFS 4. VLOOKUP 5. INDEX + MATCH combination 6. Working with Date and Time values in Excel Formulas 7. Working with Text Values 8. Implementing Business Logic using AND/OR/NOT 9. Summarize Filtered Values with SUBTOTAL 10. ERROR in Formulas 10 DATA ANALYSIS There are a million ways to analyze data in Excel. But as an intermediate-level user, you should focus on learning the core analysis concepts first before moving to advanced topics. In this chapter, I will be talking about the top 10 ways to analyze data in Excel. 1. 2. 3. 4. 5. 6. 7. Basic Statistics Weighted Average Quickly Spotting OUTLIERS using Conditional Formatting Find Common Values between Lists Extract TOP / BOTTON 5 Values Filters Avoid VLOOKUPS with Multi – Table PIVOTS #excelwithumaer Excel for Data Analysts 8. MONTHLY / QUARTERLY Totals from Daily Data (Aggregation) 9. Look for Trends 10. Make you’re Analysis Interactive 10 CHARTS We all know how to make column charts, lines, and pies. But when it comes to business analysis and reporting, it is necessary to learn how to make a few different types of advanced charts in Excel. In this chapter, we will see the top 10 charts for data analysis. Before we into the top 10 charts, first let me highlight the importance of picking the right type of chart for each situation. The process for picking a chart is simple. 1. Figure out what information you want to present. This is easy because most of the time, you know it, or someone asks you for it. But for the rare occasions when you are asked to analyze this data and present something, select one of the below six key messages. a. Comparison b. Trend c. Distribution d. Relationship e. Parts of Whole f. Deviation 2. Gather your data and turn it into information. Now that you know what your chart needs to say, take your data and turn it into necessary information. This can be done by either formulas or pivot tables or other tools. 3. Make the chart. Pick the chart that conveys the message you want concisely. When in doubt, use below mapping table to decide which chart goes with each message. #excelwithumaer Excel for Data Analysts 4. Format the chart. Most of the time, the default chart in Excel is not ready for distribution. Format the chart by removing any distractions, adding the necessary title, and caption, and applying labels if needed. Align & size it properly. That is all. Your chart is now ready. Top 10 Charts 1. 2. 3. 4. 5. 6. 7. 8. Thermometer Chart Combo Chart Smart Titles & Captions on your charts Analyze Distribution with Histograms Box plots Indexed Charts Interactive Charts Last Year Vs This Year Analysis #excelwithumaer Excel for Data Analysts 9. Highlight Important points in charts 10. Tables are Charts too SELF-LEARNING TIPS FOR LEARNING EXCEL 1. 2. 3. 4. 5. 6. 7. 8. Focus on Learning rather than skimming everything Practice alongside learning Make notes, it will be very helpful in the revision Do not try to mug up all formulas, memorize only the important formulas, and the rest you must google when you need. Using Google Effectively No Excel Expert Knows everything, they find the approach to the problem and use Google for the rest. Start making projects as soon as you complete a little intermediate stuff. Ex: Personal finance, To Do list. Make a Excel Learning Tracker in Excel. ALL THE BEST. KEEP LEARNING. KEEP EXCELLING. KEEP UPSKILLING #excelwithumaer