Assuming that you want to check if a given Cell such as B1 contains a text string “excel”, if True, returns another text string “learning excel” in Cell C1. How to achieve it. You can use a formula based on the IF function, the ISNUMBER function and the SEARCH function to achieve the result of return a value if Cell contains a specific value. Just like this:

**=IF(ISNUMBER(SEARCH("excel",B1)),"learning excel","")**

Type this formula into the formula box of cell C1, and then press **Enter** key in your keyboard.

You will see that the text string “learning excel” will be returned in the Cell C1.

And if you want to check the range of cells B1:B4, you need to drag the AutoFill Handle down to other cells to apply this formula.

Now, let’s dive into the second method, which involves creating a custom function using VBA. We’ll guide you through the step-by-step process of writing the VBA code, making it accessible even if you’re new to coding.

**Step1: **Press

to open the Visual Basic for Applications editor.**Alt + F11**

**Step2: **Right-click on any item in the Project Explorer, go to

, and select **Insert**

.**Module**

**Step3: **Copy and paste the following VBA code into the module:

```
Function CheckText(cellValue As Range, targetText As String) As String
If InStr(1, cellValue.Value, targetText, vbTextCompare) > 0 Then
CheckText = "learning excel"
Else
CheckText = ""
End If
End Function
```

Note: This code defines a function named CheckText that checks if a cell contains specific text.

**Step4: **Close the VBA editor.

**Step5: **Now, you can use your new function in Excel. In a cell, enter the formula:

`=CheckText(B1, "excel")`

**Note:** Replace “**excel**” with your target text and adjust the cell reference as needed.

**Step6: **After entering the formula, press **Enter**. The cell will display “**learning excel**” if the specified text is found; otherwise, it will be blank.

This tutorial video will show you how to return a value if a cell contains specific text in Excel. This is a common task in data processing, and we’re here to guide you through two effective methods to achieve this goal. Let’s explore both methods – one using a formula and the other with a User-Defined Function (UDF) in VBA.

- Excel SEARCH function

The Excel SEARCH function returns the number of the starting location of a substring in a text string.The syntax of the SEARCH function is as below:= SEARCH (find_text, within_text,[start_num])… - Excel ISNUMBER function

The Excel ISNUMBER function returns TRUE if the value in a cell is a numeric value, otherwise it will return FALSE.The syntax of the ISNUMBER function is as below:= ISNUMBER (value)… - Excel IF function

The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE.The syntax of the IF function is as below:= IF (condition, [true_value], [false_value])…

Assuming that you have a list of data in the range of cells A1:B5 with the different background color. and you want to filter cells or rows based on the background color of a specified cell, and then select all filtered cells. How to achieve it. You can use the** Filter feature** or **Find function** to achieve the result in Excel. Just refer to the following detailed steps.

To filter and select cells by background color of another cell with Filter command, just do the following steps:

** #1** select one column that you want to filter by cell color

** #2** go to

** #3** click

** #4** all rows in the selected column have been filtered by selected color.

** #5** then you can press

You can also use the Find command to filter cells by color in excel. Let’s see the below steps:

** #1** select the range of cells that you want to select cells based on the background color of another cell.

** #2** go to

** #3** In

** #4 **click

** #5** All cells based on the color of the selected color have been selected in the selected range.

This comprehensive video tutorial will show you how to filter cells based on the background color in Excel. In this session, we’ll explore two powerful methods that cater to different preferences and scenarios: using the “Filter” feature and employing the “Find” feature.

The post How to Filter and Select Cells by Color first appeared on ExcelHow.]]>If you want to extract word that contains a hash character in a text string in Cell B1, you can use a combination of the TRIM function, the MID function, the SUBSTITUTE function, the REPT function, the FIND function to create an excel formula as follows:

**=TRIM(MID(SUBSTITUTE(B1," ",REPT(" ",255)),FIND("#",SUBSTITUTE(B1," ",REPT(" ",255)))-100,255))**

Let’s see how this formula works:

**= SUBSTITUTE(B1,” “,REPT(” “,255))**

The REPT function will return a new text string that contains 255 empty spaces. And it goes into the SUBSTITUTE function as its new_text argument. Then the SUBSTITUTE function will replace all empty string with new text value returned by the REPT function.

**= FIND(“#”,SUBSTITUTE(B1,” “,REPT(” “,255)))-100**

This formula will locate the position of the first hash character (#) in a text string that returned by the SUBSTITUTE function.

**= MID(SUBSTITUTE(B1,” “,REPT(” “,255)),FIND(“#”,SUBSTITUTE(B1,” “,REPT(” “,255)))-100,255)**

This MID function will extract 255 characters from a text string (returned by the SUBSTITUTE function) at a specific position that returned by the FIND function. Then the word that contain hash character will be returned.

**=TRIM()**

The TRIM function removes all spaces from text string returned by the MID function, just leave one space between words.

Now, for our second method, we’ll explore a more advanced technique. By leveraging the power of VBA, we can create a custom function for this task. Follow these steps:

**Step1: **Press **Alt + F11 to** open the Visual Basic for Applications (VBA) editor.

**Step2: **Right-click on any item in the Project Explorer, select **Insert**, and then choose **Module**.

**Step3: **Copy the provided VBA code and paste it into the module.

```
Function ExtractWordsWithChar(rng As Range, char As String) As String
Dim cell As Range
Dim words() As String
Dim result As String
For Each cell In rng
words = Split(cell.Value, " ")
For Each word In words
If InStr(1, word, char) > 0 Then
result = result & word & " "
End If
Next word
Next cell
ExtractWordsWithChar = Trim(result)
End Function
```

**Step4: **Save your work and close the VBA editor.

**Step5: **In any cell, type:

`=ExtractWordsWithChar(B1, "#")`

**Note: **Replace “B1” with the reference to your target cell.

** Step6: **Press

This Excel video tutorial where we’re unraveling the mysteries of data manipulation by exploring two methods to extract words containing a specific character. Our first method involves a potent Excel formula, ideal for those who appreciate the simplicity of functions. In the second method, we’ll venture into the realm of VBA, creating a custom function tailored for precision.

- Split Multiple Lines from a Cell into Rows

If you have multiple lines in a cell and each line is separated by line break character or press “alt + enter” key while you entering the text string into cells, and you need to extract the multiple lines into the separated rows or columns, you can use a combination with the TRIM function, the MID function, the SUBSTITUTE function, the REPT function, the LEN function to create a complex excel formula..… - Extract word that starting with a specific character

Assuming that you have a text string that contains email address in Cell B1, and if you want to extract word that begins with a specific character “@” sign, you can use a combination with the TRIM function, the LEFT function, the SUBSTITUTE function, the MID function, the FIND function, the LEN function and the REPT function to create an excel formula.…

- Excel Substitute function

The Excel SUBSTITUTE function replaces a new text string for an old text string in a text string.The syntax of the SUBSTITUTE function is as below:= SUBSTITUTE (text, old_text, new_text,[instance_num])…. - Excel TRIM function

The Excel TRIM function removes all spaces from text string except for single spaces between words. You can use the TRIM function to remove extra spaces between words in a string.The syntax of the TRIM function is as below:= TRIM (text)…. - Excel MID function

The Excel MID function returns a substring from a text string at the position that you specify.The syntax of the MID function is as below:= MID (text, start_num, num_chars)…. - Excel FIND function

The Excel FIND function returns the position of the first text string (sub string) within another text string.The syntax of the FIND function is as below:= FIND(find_text, within_text,[start_num])… - Excel REPT function

The Excel REPT function repeats a text string a specified number of times.The syntax of the REPT function is as below:= REPT (text, number_times)…

In Excel, and you can use Data Validation feature to improve the efficiency of data entry in excel, and it also be used to reduce mistake and typing errors. And it is also be used to restrict the user for the type of data that can be entered in the range.

Assuming that you have a list of data in your current worksheet, and you can want to create a dynamic drop down list based on those data without blank cells, and if you use the usual method to create it, and it may be doesn’t work. And you can use an OFFSET formula and count the entries in the column, and calculate the number of rows in the range, and then create a source list without blanks, and use formulas to pull the numbered items into a new column. Just do the following steps:

**Step1:** select cell A2 next to the original data list B1:B8, and type the following formula in Cell A2, and copy it down to cell A8, and it will number the cells that are not blank.

**=IF(B2="","",MAX(A$1:A1)+1)**

**Step2:** then you can create a new source list column without blanks based on the source data list, just enter the following formula into the cell D2 in a new column, and then copy it down to the cell D8 to create a new data list with all the blanks at the end.

**=IFERROR(INDEX($B$2:$B$8,MATCH(ROW()-ROW($D$1),$A$2:$A$8,0)),"")**

**Step3:** you can create a dynamic drop down list based on the newly source range without blanks. Select a cell that you want to create dynamic drop down list , and go to **Data** tab, and click **Data Validation **command under **Data Tools** group. And the **Data Validation** dialog will appear.

**Step4:** select List value from the Allow drop down list in the Data Validation dialog box, and enter the following formula into the Source text box. And click Ok button.

**=OFFSET($D$1,1,0,MAX($A:$A),1)**

**Step5:** You would see that the dynamic drop down list should be created without blanks in your current worksheet.

This Excel video tutorial where we’ll unravel the art of creating dynamic drop-down lists without blanks. We’ll guide you step by step on how to design dynamic drop-down lists that adapt to your data seamlessly, enhancing your Excel efficiency.

- Excel IF function

The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE. The IF function is a build-in function in Microsoft Excel and it is categorized as a Logical Function.The syntax of the IF function is as below:= IF (condition, [true_value], [false_value])…. - Excel IFERROR function

The Excel IFERROR function returns an alternate value you specify if a formula results in an error, or returns the result of the formula.The syntax of the IFERROR function is as below:= IFERROR (value, value_if_error)…. - Excel INDEX function

The Excel INDEX function returns a value from a table based on the index (row number and column number)The INDEX function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the INDEX function is as below:= INDEX (array, row_num,[column_num])… - Excel MATCH function

The Excel MATCH function search a value in an array and returns the position of that item.The MATCH function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the MATCH function is as below:= MATCH (lookup_value, lookup_array, [match_type])…. - Excel MAX function

The Excel MAX function returns the largest numeric value from the numbers that you provided. Or returns the largest value in the array.= MAX(num1,[num2,…numn])… - Excel ROW function

The Excel ROW function returns the row number of a cell reference.The ROW function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the ROW function is as below:= ROW ([reference])….

Assuming that you have a list of data in range A1:B4, in which contain start dates and end dates. And you want to calculate the number of weekend days between start date and end date. How to do it. You can use a formula based on the NETWORKDAYS function and the DAYs function to calculate the number of weekends between two given dates.

Here is the formula that it will count the total number of weekend days between two given dates:

**=DAYS(B2,A2)+1-NETWORKDAYS(A2,B2)**

Type this formula into cell C2, and press **Enter** key on your keyboard, and then copy this formula from cell C2 to range C3:C4 to apply this formula.

Let’s see how this formula works:

The NETWORKDAYS function try to calculate the number of working days (weekdays) between two dates, and the DAYS function will count the number of days between two dates. So you can use days number to subtract working days, then you will get the number of weekends days.

let’s dive into the second method, where we’ll create a custom function using VBA.

**Step1:** Launch Excel and access the workbook.

**Step2:**Invoke the Visual Basic for Applications (VBA) editor by pressing **Alt + F11**.

**Step3:**Within the VBA editor, right-click on any item in the Project Explorer, navigate to **Insert**, and select **Module**.

**Step4:**Paste the following VBA code into the module:

```
Function CountWeekends(startDate As Date, endDate As Date) As Integer
Dim currentDate As Date
Dim weekendCount As Integer
currentDate = startDate
weekendCount = 0
Do While currentDate <= endDate
If Weekday(currentDate) = 1 Or Weekday(currentDate) = 7 Then
weekendCount = weekendCount + 1
End If
currentDate = currentDate + 1
Loop
CountWeekends = weekendCount
End Function
```

**Step5:** Exit the VBA editor.

**Step6: **in a cell, enter the formula:

`=CountWeekends(A2, B2)`

Adjust the cell references based on your start and end date cells.

After entering the formula, press **Enter**. The cell will display the count of weekends using your custom function.

If you only want to count the number of Sundays between two given dates in Excel, you can use an Excel formula based on the INT function and the WEEKDAY function. Like this:

**=INT((WEEKDAY(B1- 1)-A2+B2)/7)**

Type this formula into cell D2, and press Enter key on your keyboard.

**Note:** if you want to count the number of other week numbers (1-7, 1 is Sunday, 2 is Monday, 3 is Tuesday, 4 is Wednesday, 5 is Thursday, 6 is Friday, 7 is Saturday ) between two dates, such as: Saturday, you just need to replace the number 1 with 7 in the above formula. Like this:

**=INT((WEEKDAY(B1- 7)-A2+B2)/7)**

This video tutorial will explore how to calculate the number of weekends between two dates in Excel, employing two distinct approaches: a handy formula and a personalized user-defined function (UDF).

- Excel INT function

The Excel INT function returns the integer portion of a given number. And it will rounds a given number down to the nearest integer.The syntax of the INT function is as below:= INT (number)… - Excel WEEKDAY function

The Excel WEEKDAY function returns a integer value representing the day fo the week for a given Excel date and the value is range from 1 to 7.The syntax of the WEEKDAY function is as below:=WEEKDAY (serial_number,[return_type])… - Excel DAYS function

The Excel DAYS function returns the number of days between two dates.The syntax of the DAYS function is as below:= DAYS (end_date,start_date)…

This post will guide you how to understand excel nested if statements through some classic examples.

Assuming that you want to reflect the below request through nested if statements:

**a)** If 1<B1<0, Then return 0.1
**b)** If 0.99<B1<5, then return 0.15
**c)** If 4.99<B1<15, then return 0.2
**d) **If 14.99<B1<30, then return 0.5

So if B1 cell was “**14.5**”, then the formula should be returned “**0.2**” in the cell.

From above logic request, we can get that it need 4 if statements in the excel formula, and there are multiple ranges so that we can combine with logical function AND in the nested if statements. The below is the nested if statements that I have tested.

**=IF(AND(B1>0,B1<1),0.1,IF(AND(B1>0.99, B1<5),0.15, IF(AND(B1>4.99,B1<15),0.2, IF(AND(B1>14.99,B1<30),0.5,””))))**

If you don’t want to use AND function in the above nested if statement, can try the below formula:

**=IF(B1<1,0.1, If(B1<5,0.15,IF(B1<15,0.2,IF(B1<30,0.5,””))))**

I want to write a nested IF statement to calculated the right Quarter based one the criteria in the below table.

According to the request, we need to compare date ranges, such as: if B1<E2<C1, then return A1.

So we can consider to use **AND logical function** in the nested if statement. The formula is as follows:

**=IF(AND(E2>B1,E2<C1),A1,IF(AND(E2>B2,E2<C2),A2,IF(AND(E2>B3,E2<C3),A3,IF(AND(E2>B4,E2<C3),A4))))**

Or we can use INDEX function and combine with MATCH Function to get the right quarter.

**=INDEX($A$1:$A$4,MATCH(E2,$B$1:$B$4,1))**

If you have the following requirement and need to write a nested IF statement in excel:

- If any of the cells A1 to C1 contain “excelhow”, then return “excelhow” in the cell E1.

- If any of the cells A1 to C1 contain “google”, then return “excelhow” in the cell E1.

- If any of the cells A1 to C1 contain “ibm”, then return “ibm” in the cell E1.

- If any of the cells A1 to C1 contain “Cloud”, then return “ibm” in the cell E1.

How to check if cell ranges A1:C1 contain another string, using “COUNTIF” function is a good choice.

Countif function: Counts the number of cells within a range that meet the given criteria

Let’s try to test the below nested if statement:

**=IF(OR(COUNTIF(A3:C3,"excelhow")>0,COUNTIF(A3:C3,"google")>0),"excelhow",IF(OR(COUNTIF(A3:C3,"ibm")>0,COUNTIF(A3:D3,"cloud")>0),"ibm",""))**

Assuming you have the following different range values, if the B1 has the value 65, then expected to return “under average”in cell C1, if the Cell B1 has the value 75, then return “average” in cell C1. And if the Cell B1 has the value 85, then return “above average” in the cell C1.

0-70 | under average |

71-80 | average |

81-100 | above average |

How do I format the nested if statement in Cell C1 to display the right value? Just try to use the below nested if function or using INDEX function.

**=IF(B1< 0,"",IF(B1<= 70, "under average",IF(B1<=80, "Average", IF(B1<=100,"Above Average",""))))**

In this Excel video tutorial, we’ll delve into four powerful methods to harness the full potential of Nested IF statements. Whether you’re dealing with multiple ranges, date ranges, a range of cells, or varying values, we’ve got you covered.

- Excel IF function

The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE. The IF function is a build-in function in Microsoft Excel and it is categorized as a Logical Function.The syntax of the IF function is as below:= IF (condition, [true_value], [false_value])…. - Excel nested if function

The nested IF function is formed by multiple if statements within one Excel if function. This excel nested if statement makes it possible for a single formula to take multiple actions… - Excel AND function

The Excel AND function returns TRUE if all of arguments are TRUE, and it returns FALSE if any of arguments are FALSE.The syntax of the AND function is as below:= AND (condition1,[condition2],…) … - Excel COUNTIF function

The Excel COUNTIF function will count the number of cells in a range that meet a given criteria.This function can be used to count the different kinds of cells with number, date, text values, blank, non-blanks, or containing specific characters.etc.The syntax of the COUNTIF function is as below:= COUNTIF (range, criteria) … - Excel INDEX function

The Excel INDEX function returns a value from a table based on the index (row number and column number)The INDEX function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the INDEX function is as below:= INDEX (array, row_num,[column_num])… - Excel MATCH function

The Excel MATCH function search a value in an array and returns the position of that item.The MATCH function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the MATCH function is as below:= MATCH (lookup_value, lookup_array, [match_type])….

The Excel SUMXMY2 function returns the sum of the squares of differences between corresponding values in two given arrays and then return the sum of the result. You can use the SUMXMY2 function to calculate the sum of the squares of the differences between two supplied arrays in excel.

The SUMXMY2 function is a build-in function in Microsoft Excel and it is categorized as a Math and Trigonometry Function.

The SUMXMY2 function is available in Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2011 for Mac.

The syntax of the SUMXMY2 function is as below:

**=SUMXMY2 (array_x, array_y)**

Where the SUMXMY2 function arguments are:

-This is a required argument. The first array or range of values.**array_x**-This is a required argument. The second array or range of values**array_y**

**Note:**

- The arguments can be numbers or names, arrays or references that contain numbers.
- empty cells, logical values , text or error values in the array or reference will be ignored.
- if array_x and array_y arguments have different lengths, the Function will return #N/A Error.
- The equation for the sum of the difference of squares is:

The below examples will show you how to use Excel SUMXMY2 Function to calculate the sum of the squares of the differences between two given array values in Excel.

** 1#** to sum of squares of differences of the two arrays A1:A2 and A3:A4 , enter the following formula in Cell B1.

**=SUMXMY2(A1:A2,A3:A4)**

** 2# **to sum of squares of differences of the two arrays constants {4,2,5} and {7,2,9}, enter the following formula in Cell B2.

**=SUMXMY2({4,2,5},{7,2,9})**

This Excel video tutorial where we’ll unravel the potential of the SUMXMY2 function in Excel.

- Excel SUM Function

The Excel SUM function will adds all numbers in a range of cells and returns the sum of these values. You can add individual values, cell references or ranges in excel.The syntax of the SUM function is as below:= SUM(number1,[number2],…)… - Excel SUMIF Function

The Excel SUMIF function sum the numbers in the range of cells that meet a single criteria that you specify. The syntax of the SUMIF function is as below:=SUMIF (range, criteria, [sum_range])… - Excel SUMIFS Function

The Excel SUMIFS function sum the numbers in the range of cells that meet a single or multiple criteria that you specify. The syntax of the SUMIFS function is as below:=SUMIFS (sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …)… - Excel SUMSQ Function

The Excel SUMSQ function returns the sum of squares of a given set of arguments.The syntax of the SUMSQ function is as below:=SUMSQ(number1, [number2], …) - Excel SUMX2MY2 Function

The Excel SUMX2MY2 function returns the sum of the difference of squares between two supplied arrays.The syntax of the SUMX2MY2 function is as below:=SUMX2MY2 (array_x, array_y)… - Excel SUMX2PY2 Function

TThe Excel SUMX2PY2 function returns the sum of the sum of squares of corresponding items in two supplied arrays. The syntax of the SUMX2PY2 function is as below:=SUMX2PY2 (array_x, array_y)…

We want to hide rows with blank cell included. In this instance, we want to hide row 7, row 8, row 14 and row 15.

In this instance, blank cells are only listed in B column. So, we can hide rows with blank cells by Excel **Filter** function. We can filter data with blank cells excluded.

**a.** Select cell B1, then click **Data** in the ribbon, in **Sort & Filter** section click **Filter** button.

**b.** After above operation, an arrow button is displayed in cell B1.

**c.** Click the **Arrow** button to show all filter settings, uncheck “(Blanks)” and keep other number options checked. Then click **OK** button.

**d.** After clicking **OK**, rows with blank cells included are hidden.

See another example below. Blank cells are listed in different columns.

If blank cells exist in multiple columns, hide rows by **Filter** is complex, we can apply **Go To Special** function to hide rows with blank cells in this instance.

In this instance, blank cells are listed in column C, D and E separately. We can apply **Go To Special ->Check on “Blanks”** to highlight all blank cells, then hide rows accordingly.

**a.** Select range A1:B6, then click **Home** in the ribbon, in **Editing** section click **Find & Select** button to see options for finding texts in document.

**b.** Click **Go To Special** option.

**c.** In **Go To Special** dialog, check on “**Blanks**” option. Options in this dialog are exclusive. Then click **OK** button.

**d.** After clicking **OK**, all blank cells are highlighted.

**e.** Keep blank cells highlighted. Press **Ctrl+9** to hide rows. In Excel, hotkey **Ctrl+9** can hide rows with cell or range highlighted. If you want to unhide rows, you can press **Ctrl+Shift+9**. If you want to hide columns instead of rows, you can press hotkey **Ctrl+0**.

This Excel video tutorial where we’ll uncover two practical methods to hide rows with blank cells in your spreadsheets in Excel.

The post Hide Rows with Blank Cells in Two Ways first appeared on ExcelHow.]]>You need to use an formula based on the TIMEVALUE function, the LEFT function, the LEN function and the RIGHT function. Like below:

`=TIMEVALUE(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1,2))`

Type this formula into a blank cell, and press **Enter** key on your keyboard to apply it. and drag the AutoFill Handle to other cells to apply this formula.

Then you need to keep these cells selected, and right click on it, select **Format Cells** from the context menu list and the **Format Cell** Dialog will open.

Switch to **Number** tab under **Format** **Cells** dialog box, and select **Time** category from the **Category** list, and select one time type as you need. click **Ok** button.

If you want to convert date and time string to a data time format in Excel, and you can use the following formula based on the DATE function, the LEFT function, the MID function, the Time Function and the RIGHT function. Like below:

`=DATE(LEFT(B1,4),MID(B1,5,2),MID(B1,7,2))+TIME(MID(B1,10,2),RIGHT(B1,2),0)`

Type this formula into a blank cell and press Enter key on your keyaboard.

Then you need to format those selected cells to a data format as you need.

This video tutorial will explore two effective methods to convert text to time in Excel. the first method will utilize the TIMEVALUE function and a combination of LEFT, LEN and RIGHT. And the second method will involue a more dynamic approach using VBA.

- Excel TIMEVALUE Function

The Excel TIMEVALUE function returns the decimal number of the time represented by a text string. so it will convert a time represented by a text string into an Excel time value.The syntax of the TIMEVALUE function is as below:=TIMEVALUE (time_text)… - Excel MID function

The Excel MID function returns a substring from a text string at the position that you specify.The syntax of the MID function is as below:= MID (text, start_num, num_chars)… - Excel LEFT function

The Excel LEFT function returns a substring (a specified number of the characters) from a text string, starting from the leftmost character.The LEFT function is a build-in function in Microsoft Excel and it is categorized as a Text Function.The syntax of the LEFT function is as below:= LEFT(text,[num_chars])… - Excel RIGHT function

The Excel RIGHT function returns a substring (a specified number of the characters) from a text string, starting from the rightmost character.The syntax of the RIGHT function is as below:= RIGHT (text,[num_chars])… - Excel TIME function

The Excel TIME function returns a date in serial number format for a particular time (the hour, minute and second).The syntax of the TIME function is as below:= TIME(hour, minute, second)…

Assuming that you have a list of data in range B1:C5 that contain sales data and you will create a pivot table based on those data, and then create a column chart based on the created pivot table. Now if you want to add average line in the pivot column chart, how to achieve it. Just do the following steps:

**#1** select the source data B1:C5, and go to **INSER** tab, click **PivotTable** command under **Tables** group to create a pivot table. And the **Create PivotTable** dialog will open.

**#2** select **Existing Worksheet** radio button, and select one cell as the location. Click **Ok** button.

**#3** checked **Fields** in **Choose fields to add to report** section in **PivotTable Fields** pane. And the pivotTable is created.

**#4** select the above pivot table, and go to **INSERT** tab, click **Insert Column Chart** command under **Charts** group. And one Column Chart based on the pivot table is created.

**#5** select the Sales column in the original data, and right click on it, select Insert from the popup menu list to insert a new column, and type Average in the first cell.

**#6** type the following formula in the Average column, and then press **Enter** key, and then drag the AutoFill Handle down to other cells.

**=AVERAGE($D$2:$D$5)**

**#7** select the pivot column chart, and go to **ANALYZE** tab, click **Refresh** command under Data group.

**#8** The Average field will be displayed in the **PivotChart Fields** pane, and then checked **Average** checkbox.

**#9** select Average Data series in the pivot chart, and select **Change Series Chart Type**, and the **Change Chart Type** dialog will open.

**#10** click **Combo** menu in the left pane, and choose the **Sum of Average** box in the **Choose the chart type and axis for your data series** section, and select **Line** **as Chart Type**. Click **OK** button.

**#11** the average line has been added into the pivot chart. Let’s see the result.

In this Excel video tutorial, you’ll learn a valuable skill – adding a grand total line to a Pivot Chart in Excel. This can make your Pivot Charts even more informative and insightful.

The post How to Add Grand Total or Average to Pivot Chart first appeared on ExcelHow.]]>