Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Create Scatter Chart in Excel
  • How to combine 2 or more chart types in a single chart in Excel
  • How To Insert and Customize Sparklines in Excel
  • How to create a Histogram in Excel
  • How to calculate current stock or inventory in Excel

References

  • How to use Excel MATCH Function
  • How to get relative column numbers in a range in Excel
  • How to get relative row numbers in a range in Excel
  • Perform case-sensitive Lookup in Excel
  • How to get address of named range in Excel

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation must begin with
  • Data validation must not exist in list
  • Excel Data validation allow weekday only
  • Excel Data validation unique values only

Tag: IF function

How to count total words in a cell in Excel

by

To count the total words in a cell, you can use a formula based on the LEN and SUBSTITUTE functions. Formula =LEN(A1)-LEN(SUBSTITUTE(A1,” “,””))+1 Explanation In the example shown, C3 contains this formula: =LEN(TRIM(B3))-LEN(SUBSTITUTE(B3,” “,””))+1 How the formula works SUBSTITUTE removes all spaces from the text, then LEN calculates the length of the text without spaces. This …

Continue Reading

How to count line breaks in cell in Excel worksheet

by

This tutorial shows how to count line breaks in cell in Excel worksheet using example below. To count total lines in a cell, you can use a formula based on the LEN, SUBSTITUTE, and CHAR functions. Formula =LEN(B5)-LEN(SUBSTITUTE(B5,CHAR(10),””))+1 Explanation In the example, we are using this formula: =LEN(B5)-LEN(SUBSTITUTE(B5,CHAR(10),””))+1 How the formula works First, the LEN function counts …

Continue Reading

How to display conditional message with REPT function in Excel

by

To display a conditional message, without the IF function, you can use boolean logic and the REPT function. Formula =REPT(“message”,logical test) Explanation  In the example shown, the formula in D5 (copied down) is: =REPT(“low”,C5<100) If the value in column C is less than 100, the formula returns “low”. If not, the formula returns an empty string (“”), which …

Continue Reading

How to compare two text strings in Excel

by

If you need to compare two text strings in Excel to determine if they’re equal, you can use the EXACT function. Formula =EXACT(text1, text2) Explanation For example, if you want to compare A2 with B2, use: =EXACT(A2,B2) If the two strings are identical, EXACT will return TRUE. If not, EXACT will return FALSE. You can …

Continue Reading

How to check cell contains which things in Excel

by

If you have a list of things (words, substrings, etc) and want to find out which of these things appear in a cell, you can build a simple table and use a formula based on the SEARCH function. Setup Suppose you have a cells that contain text that mentions various colors, and you want to …

Continue Reading

Add line break based on OS in Excel

by

To add a line break taking into account the current OS (Mac or Windows), you can use the INFO function to test the system and then return the correct break character — CHAR(10) for Windows, CHAR(13) for Mac. Note: make sure you have text wrap enabled on cells that contain line breaks. Formula =IF(INFO(“system”)=”mac”,CHAR(13),CHAR(10)) Explanation The character …

Continue Reading

Calculate series of dates by workdays in Excel

by

This tutorials covers how to generate series of dates increment by workdays from a single start date in Excel If need to generate a dynamic series of dates that are workdays only (i.e. Monday through Friday), you can do so with a simple formula that uses the the WORKDAY function Formula =WORKDAY(date,1) Explanation   In the …

Continue Reading

Generate series of dates by weekends in Excel

by

This tutorials covers how to generates Series of dates increment by weekends from a single start date in Excel. If need to generate a dynamic series of dates with a formula that include only future weekend dates (i.e. Sat and Sun), you can do so with a formula that uses the IF and WEEKDAY functions. Formula …

Continue Reading

Calculate total hours that fall between two times in Excel

by

Case study You have a start time and an end time, and you want to know how many of the hours in between these two times overlap another time period in the day. For example, you want to know how many hours fall between 8:00 AM and 5:00 PM, or 7:00 PM to 7:00 AM, etc. …

Continue Reading

List holidays between two dates in Excel

by

To list holidays that occur between two dates, you can use a formula based on the TEXTJOIN and IF functions.  Formula {=TEXTJOIN(“, “,TRUE,IF(dates>=start,IF(dates<=end,holidays,””),””))} Note: the TEXTJOIN function is new in Excel 2016. Explanation In the example shown, the formula in F8 is: {=TEXTJOIN(“, “,TRUE,IF(B4:B12>=F5,IF(B4:B12<=F6,C4:C12,””),””))} This is an array formula and must be entered with control + shift + enter. How …

Continue Reading

Roll back weekday to Friday base on a particular date in Excel

by

Case study: If Monday, roll back to Friday To check the weekday of a date, and roll back to Friday when the date is a Monday, you can use the IF and WEEKDAY functions. Formula =IF(WEEKDAY(date)=2,date-3,date) Explanation In the example shown, the formula in C5 is =IF(WEEKDAY(B5)=2,B5-3,B5) How this formula works The WEEKDAY function returns …

Continue Reading

Get work hours between dates and times in Excel

by

To calculate total work hours between two dates and times, you can use a formula based on the NETWORKDAYS function. Formula =(NETWORKDAYS(start,end)-1)*(upper-lower) +IF(NETWORKDAYS(end,end),MEDIAN (MOD(end,1),upper,lower),upper) -MEDIAN(NETWORKDAYS(start,start) *MOD(start,1),upper,lower) Explanation In the example shown, E5 contains this formula: =(NETWORKDAYS(B5,C5)-1)*(upper-lower) +IF(NETWORKDAYS(C5,C5),MEDIAN (MOD(C5,1),upper,lower),upper) -MEDIAN(NETWORKDAYS(B5,B5) *MOD(B5,1),upper,lower) where “lower” is the named range H5 and “upper” is the named range H6. How this formula …

Continue Reading

How to calculate next scheduled event in Excel

by

To get the next scheduled event from a list of events with dates, you can use an array formula based on the MIN and TODAY functions to find the next date, and INDEX and MATCH  to display the event on that date. Formula {=MIN(IF((range>=TODAY()),range))} Note: this is an array formula and must be entered with Control + …

Continue Reading

Nested IF function example in Excel

by

This tutorial shows how to calculate Nested IF function example in Excel using the example below; Formula =IF(T1,R1,IF(T2,R2,IF(T3,R3,IF(T4,R4,R5)))) Explanation In the code above, T1-T5 represents 5 different logical tests, and R1-R5 represents 5 different results. You can see that each IF function requires it’s own set of parentheses. This article describes the Excel nested IF construction. Usually, …

Continue Reading

How to Check If A Cell Contains Specific Text in Excel

by

To check if a cell contains specific text, you can use the ISNUMBER and the SEARCH function in Excel. The ISNUMBER functions is used to check for a numeric value and the  SEARCH function returns the location of a substring in a string. There’s no CONTAINS function in Excel. 1. To find the position of a substring in a text …

Continue Reading

Calculate number of hours between two times in Excel

by

This tutorials shows how to calculate number of hours between two times in Excel. To calculate the number of hours between two times, you can use a formula that simply subtracts the start time from the end time. This is useful to calculate working time, calculate elapsed time, etc. However, when times cross a day boundary …

Continue Reading

Assign points based on late time in Excel

by

It you need to assign points based on late time in Excel then this tutorials is for you. See the example below. To assign penalty points based on an amount of time late, you can use a nested IF formula. Formula = IF(time<VALUE(“0:05”),0, IF(time<VALUE(“0:15”),1, IF(time<VALUE(“0:30”),2, IF(time<VALUE(“0:60”),3, IF(time<VALUE(“4:00”),4, 5))))) Explanation In the example shown, the formula in E5 …

Continue Reading

Excel Data validation with conditional list

by

How to create a drop-down and multiple dependent drop-down lists.in Excel To allow a user to switch between two or more lists, you can use the IF function to test for a value and conditionally return a list of values based on the result. Formula =IF(A1=”See full list”,long_list,short_list) Explanation In the example shown above, the …

Continue Reading

Highlight row and column intersection exact match in Excel

by

This tutorial shows how to Highlight row and column intersection exact match in Excel using the example below; Formula =OR($A1=row_val,A$1=col_val) Explanation To highlight intersecting row(s) and column(s) with conditional formatting based on exact matching, you can use a simple formula based on mixed references and the OR function. In the example shown, the formula used …

Continue Reading

Highlight numbers that include symbols in Excel

by

This tutorial shows how to Highlight numbers that include symbols in Excel using the example below; Formula =IF(ISNUMBER(B4),B4<input,IF(LEFT(B4)=”<“,(MID(B4,2,LEN(B4))+0)<input)) Explanation To highlight numbers less than a certain value, including numbers entered as text like “<9”, “<10”, etc., you can use conditional formatting with a formula strips the symbols as needed and handles the result as a …

Continue Reading

Running count group by n size in Excel

by

This tutorial shows how to Running count group by n size in Excel using the example below; Formula =CEILING(COUNTA(expanding_range)/size,1) > Explanation To creating a running count of groups of a variable size, you can use the COUNTA and CEILING function. In the example shown, C5 contains this formula: =CEILING(COUNTA($B$5:B5)/size,1) where “size” is the named range F4. How …

Continue Reading

If this AND that in Excel

by

This tutorial shows how to calculate If this AND that in Excel using the example below; Formula =IF(AND(A1=”this”,B1=”that”),”x”,””) Explanation If you want to do something specific when two or more conditions are TRUE, you can use the IF function in combination with the AND function to evaluate conditions with a test, then take one action if the result …

Continue Reading

If else in Excel

by

This tutorial shows how to calculate If else in Excel using the example below; Formula =IF(test, true result, false result) Explanation If you need to test a condition, then take one action if the condition is TRUE, and another action if the condition if FALSE, you can use the IF function. Context In the example shown, we …

Continue Reading

If cell is x or y and z in Excel

by

This tutorial shows how to calculate If cell is x or y and z in Excel using the example below; Formula =IF(AND(OR(A1=x,A1=y),B1=z),”yes”,”no”) Explanation You can combine logical statements with the OR and AND functions inside the IF function. If color is red or green and quantity is greater than 10 In the example shown, we …

Continue Reading

If cell is this OR that in Excel

by

This tutorial shows how to calculate If cell is this OR that in Excel using the example below; Formula =IF(OR(A1=”this”,A1=”that”),”x”,””) Explanation If you want to do something specific when a cell equals this or that (i.e. is equal to X or Y, etc.) you can use the IF function in combination with the OR function to …

Continue Reading

IF with boolean logic in Excel

by

This tutorial shows how to calculate IF with boolean logic in Excel using the example below; Formula = IF(criteria1*criteria2*criteria3,result) Explanation In the example shown, the formula in F8 is: {=SUM(IF((color=”red”)*(region=”East”)*(quantity>7),quantity))} Note: this is an array formula, and must be entered with control + shift + enter. How this formula works Note: This example demonstrates how to replace a nested …

Continue Reading

Win loss points calculation in Excel

by

This tutorial shows how to work Win loss points calculation in Excel using the example below; To assign points based on win/loss/tie results for a team, you can use a simple VLOOKUP formula, or a nested IF formula, as explained below. Formula =VLOOKUP(result,points_table,2,0) Explanation In the example shown, the formula in D5 is: =VLOOKUP(C5,points_table,2,0) How this …

Continue Reading

If cell is not blank in Excel

by

This tutorial shows how to calculate If cell is not blank in Excel using the example below; Formula =IF(A1<>””,”Not blank”,”Blank”) Explanation If you want to test a cell and take some action if the cell is not blank (not empty), you can use a simple formula based on the IF function. In the example shown, we have …

Continue Reading

Return blank if in Excel

by

This tutorial shows how to calculate Return blank if in Excel using the example below; Formula =IF(A1=1,B1,””) Explanation To return a blank result using the IF function, you can use an empty string (“”).  In the example shown, the formula in D5 (copied down) is: =IF(B5=1,C5,””) How this formula works This formula is based on the IF function, …

Continue Reading

Tax rate calculation with fixed base in Excel

by

This tutorial shows how to work Tax rate calculation with fixed base in Excel using the example below; Formula =IF(A1<limit,A1*rate,(A1-limit)*rate+fixed) Explanation This example shows how to set up simple formula using the IF function to calculate a tax amount with both fixed and variable components. In the example shown, the formula in C5 is: =IF(B5<limit,B5*rate,(B5-limit)*rate+fixed) in a …

Continue Reading

If cell contains in Excel

by

This tutorial shows how to calculate If cell contains in Excel using the example below; If you want to copy cells that contain certain text, you can use a formula that uses the IF function together with the SEARCH and ISNUMBER functions. Formula =IF(ISNUMBER(SEARCH(“abc”,A1)),A1,””) Explanation Once you find a value you’re looking for you can …

Continue Reading

If cell equals in Excel

by

This tutorial shows how to calculate If cell equals in Excel using the example below; Formula =IF(A1=”red”,true result,false result) Explanation If you want to do something specific when a cell equals a certain value, you can use the IF function to test the value, then do something if the result is TRUE, and (optionally) do something else …

Continue Reading

Invoice status with nested if in Excel

by

This tutorial shows how to calculate Invoice status with nested if in Excel using the example below; Formula =IF(balance=0,”Paid”,IF(current_date<due_date,”Open”,”Overdue”)) Explanation To determine invoice status (i.e. paid, open, overdue), you can use a nested IF formula and the TODAY function. In the example shown, the formula in G5 is: =IF(F5=0,”Paid”,IF(TODAY()<C5,”Open”,”Overdue”)) How this formula works Note: the “current date” …

Continue Reading

If NOT this or that in Excel

by

This tutorial shows how to calculate If NOT this or that in Excel using the example below; Formula =IF(NOT(OR(A1=”red”,A1=”green”)),”x”,””) Explanation If you want to do something specific when a cell is NOT this or that (i.e. is NOT equal to X or Y, etc.) you can use the IF function in combination with the NOT and OR functions …

Continue Reading

If cell is greater than in Excel

by

This tutorial shows how to calculate If cell is greater than in Excel using the example below; Formula =IF(A1>30,”Yes”,”No”) Explanation If you want to take an action when a cell value is greater than a certain value, you can use the IF function to test a value and return one value if the test is …

Continue Reading

If this AND that OR that in Excel

by

This tutorial shows how to calculate If this AND that OR that in Excel using the example below; Formula =IF(AND(A1=”x”,OR(B1=”y”,B1=”z”)),”x”,””) Explanation To test for various combinations of this AND that, or this OR that, you can use the IF function with the AND and OR functions. In the example shown, the formula in D6 is: =IF(AND(B6=”red”,OR(C6=”small”,C6=”medium”)),”x”,””) When an item …

Continue Reading

IF with wildcards in Excel

by

This tutorial shows how to calculate IF with wildcards in Excel using the example below; Formula =IF(COUNTIF(A1,”??-????-???”),””,”invalid”) Explanation The IF function doesn’t support wildcards, but you can combine IF with COUNTIF or COUNTIF to get basic wildcard functionality. In the example shown, the formula in C5 is: =IF(COUNTIF(B5,”??-????-???”),””,”invalid”) How this formula works Unlike several other frequently used functions, …

Continue Reading

Not Equal To ‘<>‘ operator in Excel

by

In Excel, <> means not equal to. The <> operator in Excel checks if two values are not equal to each other. Let’s take a look at a few examples. 1. The formula in cell C1 below returns TRUE because the text value in cell A1 is not equal to the text value in cell B1. 2. …

Continue Reading

OR function Examples in Excel

by

The OR function in Excel returns TRUE if any of the conditions are TRUE and returns FALSE if all conditions are false. Combine the OR function with other functions and become an Excel expert. 1. For example, take a look at the OR function in cell D2 below. Explanation: the OR function returns TRUE if the first score is …

Continue Reading

How to create Checklist in Excel

by

This example teaches you how to  insert checkbox to create a checklist in Excel. First, turn on the Developer tab. Next, you can create a checklist. You can also insert a check mark symbol. To create this checklist, execute the following steps. 1. On the Developer tab, in the Controls group, click Insert. 2. Click Check Box in the Form Controls section. 3. …

Continue Reading

Posts navigation

  • 1
  • 2
  • Next

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel
  • IF with boolean logic in Excel
  • How to use Excel XOR Function
  • IF with wildcards in Excel

Date Time

  • NOW function: Description, Usage, Syntax, Examples and Explanation
  • TIME function: Description, Usage, Syntax, Examples and Explanation
  • Get day name from date in Excel
  • How to calculate months between dates in Excel
  • Get last weekday in month in Excel

Grouping

  • Map inputs to arbitrary values in Excel
  • Calculate conditional mode with criteria in Excel
  • How to randomly assign people to groups in Excel
  • Group times into unequal buckets in Excel
  • Categorize text with keywords in Excel

General

  • Delete Blank Rows at Once in Excel
  • How to make excel worksheets print on one page?
  • Customize Ribbon In Excel
  • How to generate random number between two numbers in Excel
  • Mark Workbook as Final in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning