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

Data Analysis

  • Remove Duplicates Example in Excel
  • Data Series in Excel
  • Get column index in Excel Table
  • How to Create Thermometer Chart in Excel
  • How to Create Area Chart in Excel

References

  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel COLUMN Function
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • How to get relative row numbers in a range in Excel
  • Perform case-sensitive Lookup in Excel

Data Validations

  • Excel Data validation number multiple 100
  • Excel Data validation with conditional list
  • Excel Data validation no punctuation
  • Excel Data validation don’t exceed total
  • Excel Data validation allow weekday only

Tag: MID function

How to retrieve workbook name only in Excel

by

If you want to get the workbook name only (i.e. the file name without path or sheet name) you can do so with a rather long formula that uses the MID function along with the FIND function. Formula =MID(CELL(“filename”,A1),FIND(“[“,CELL (“filename”,A1))+1,FIND(“]”,CELL(“filename”,A1)) -FIND(“[“,CELL(“filename”,A1))-1) Explanation How the formula works The cell function is used to get the full …

Continue Reading

How to strip protocol and trailing slash from URL in Excel

by

To remove the protocol (i.e. http://, ftp://, etc.) and trailing slash from a URL, you can use a formula based on the MID, FIND, and LEN functions. Formula =MID(url,FIND(“//”,url)+2,LEN(url)-FIND(“//”,url)-1-(RIGHT(url)=”/”)) Explanation In the example shown, the formula in C5 is: =MID(B4,FIND(“//”,B4)+2,LEN(B4)-FIND(“//”,B4)-1-(RIGHT(B4)=”/”)) How this formula works The core of this formula is the MID function, which extracts …

Continue Reading

Excel Data validation specific characters only

by

Set criteria to accept specific characters only To use data validation to allow a list of specific characters only, you can use a rather complicated array formula based on the COUNT, MATCH, and LEN functions. Formula =COUNT(MATCH(MID(A1,ROW(INDIRECT (“1:”&LEN(A1))),1),allowed&””,0))=LEN(A1) Explanation In the example shown, data validation is applied with this formula: =COUNT(MATCH(MID(B5,ROW(INDIRECT (“1:”&LEN(B5))),1),allowed&””,0))=LEN(B5) where “allowed” is …

Continue Reading

Convert date string to date time in Excel

by

This tutorial shows how to Convert date string to date time in Excel using example below. To convert a date string to a datetime (date with time) you can parse the text into separate components then build a proper datetime. When date information from other systems is pasted or imported to Excel, it may not …

Continue Reading

Convert text date dd/mm/yy to mm/dd/yy in Excel

by

This tutorial shows how to Convert text date dd/mm/yy to mm/dd/yy in Excel using example below. To convert dates in text format dd/mm/yy to a true date in mm/dd/yy format, you can use uses a formula based on the DATE function. Formula =DATE(RIGHT(A1,2)+2000,MID(A1,4,2),LEFT(A1,2)) Explanation In the example shown, the formula in C5 is: =DATE(RIGHT(B5,2)+2000,MID(B5,4,2),LEFT(B5,2)) Which …

Continue Reading

Convert text to numbers using VALUE function in Excel

by

To convert simple text values to numbers, you can use the the VALUE function, or simply add zero as described below. Formula =VALUE(A1) Explanation In the example shown, the formula in C5 is: =VALUE(B5) Background Sometimes Excel ends up with text in a cell, when you really want a number. There are many reasons this …

Continue Reading

How to convert text string to array in Excel

by

To convert a string to an array that contains one item for each letter, you can use an array formula based on the MID, ROW, LEN and INDIRECT functions. This can sometimes be useful inside other formulas that manipulate text at the character level.  Formula {=MID(string,ROW(INDIRECT(“1:”&LEN(string))),1)} Note: this is an array formula and must be …

Continue Reading

Get work hours between dates custom schedule in Excel

by

To calculate work hours between two dates with a custom schedule, you can use a formula based on the WEEKDAY and SUMPRODUCT functions, with help from ROW, INDIRECT, and MID. Formula =SUMPRODUCT(MID(schedule,WEEKDAY (ROW(INDIRECT(start&”:”&end))),1)*ISNA (MATCH(ROW(INDIRECT(start&”:”&end)),holidays,0))) Explanation In the example shown, the formula in F8 is: =SUMPRODUCT(MID(D6,WEEKDAY(ROW (INDIRECT(B6&”:”&C6))),1)*ISNA(MATCH (ROW(INDIRECT(B6&”:”&C6)),holidays,0))) Which returns 36 hours, based on a custom …

Continue Reading

How to abbreviate names or words in Excel

by

To abbreviate text that contains capital letters, you can try this array formula based on the TEXTJOIN function, which is new in Excel 2016. You can use this approach to create initials from names, or to create acronyms. Only capital letters will survive this formula, so the source text must include capitalized words. You can …

Continue Reading

How to Capitalize first letter in a sentence in Excel

by

This tutorial shows how to capitalize first letter in Excel. In Microsoft office word it is called sentence case, in Excel to capitalize the first letter in a word or string, you can use a formula based on the LEFT, MID, and LEN functions. Formula =UPPER(LEFT(A1))&MID(A1,2,LEN(A1)) Explanation  In the example shown, the formula in C5 is: …

Continue Reading

Convert text timestamp into time in Excel

by

This tutorial show how to Convert text timestamp into time in Excel using the example below. Top convert a timestamp entered as text into a proper Excel time, you can use the MID function to extract components and the TIME function to assemble the time. Formula =TIME(MID(A1,1,2),MID(A1,4,2),MID(A1,7,2)) Explanation of how this formula works In the example …

Continue Reading

Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel

by

Excel has many functions to offer when it comes to manipulating text strings. Formula tab → Function Library Group → Text Function N/B: Every formula in excel must begin with an equal sign, function then in bracket; cell name/cell ranges/cell references. Syntax: =fx(cell name/cell ranges/cell references) Example: = Sum( A1:B4) Where Sum is the function name and A1:B4 is …

Continue Reading

Convert text to date in Excel

by

This tutorial show how to Convert text to date in Excel using the example below. To convert text in an unrecognized date format to a proper Excel date, you can parse the text and assemble a proper date with a formula based on several functions: DATE, LEFT, MID, and RIGHT. Note: Before you go the formula route, see …

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

Count numbers third digit equals 3 in Excel

by

This tutorial shows how to Count numbers third digit equals 3 in Excel using the example below; Formula =SUMPRODUCT(–(MID(range,3,1)=”3″)) Explanation To count numbers where the third digit equals 3, you can use a formula based on the SUMPRODUCT and MID functions. In the example shown, the formula in E5 is: =SUMPRODUCT(–(MID(B5:B12,3,1)=”3″)) How this formula works …

Continue Reading

How to Separate Text Strings in Excel

by

This example teaches you how to separate strings in Excel. Asides from using ‘Convert Text to Columns Wizard’ in data tab, you can as well follow the steps below to Separate Text Strings in Excel . The problem we are dealing with is that we need to tell Excel where we want to separate the string. In case of …

Continue Reading

MID, MIDB functions: Description, Usage, Syntax, Examples and Explanation

by

What are MID, MIDB functions in Excel? MID, MIDB functions are  TEXT functions in Microsoft Excel. MID returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify. While, MIDB returns a specific number of characters from a text string, starting at the …

Continue Reading

Basic outline numbering in Excel

by

This tutorial shows how to create 1st and 2nd level outline formatting using excel formulas. To generate basic outline numbering you can use COUNTA, MID, FIND, IF, and LEN functions. Note: The formula used will only handle a 2-level outline. Explanation In the example shown, the formula in D5 is: =COUNTA($B$5:B5)&”.”&IF(B5<>””,1, MID(D4,FIND(“.”,D4)+1,LEN(D4))+1) How this formula works At …

Continue Reading

Convert feet and inches to inches in Excel

by

To convert a measurement in feet and inches to inches only (i.e. 4’5″ to 53) you can use a formula based on several functions, including LEFT, FIND, MID, and SUBSTITUTE. See illustration below: Formula =LEFT(B5,FIND(“‘”,B5)-1)*12+SUBSTITUTE (MID(B5,FIND(“‘”,B5)+1,LEN(B5)),””””,””) Explanation In the example shown, the formula in D5 is: =LEFT(B5,FIND(“‘”,B5)-1)*12+SUBSTITUTE (MID(B5,FIND(“‘”,B5)+1,LEN(B5)),””””,””) How this formula works In the first …

Continue Reading

How to extract substring in Excel

by

To extract a substring with an Excel formula, you can use the MID function. Note: In this example, we are calculating the end position in order to extract a substring with a literal start and end position. However, if you know the number of characters to extract, you can just plug in that number directly.  Formula …

Continue Reading

How to extract word containing specific text in Excel

by

To extract a word that contains specific text,you can use a formula based on several functions, including TRIM, LEFT, SUBSTITUTE, MID, MAX, and REPT. You can use this formula to extract things like email addresses, or other substrings with a unique id. Formula =TRIM(MID(SUBSTITUTE(A1,” “,REPT(” “,99)), MAX(1,FIND(“@”,SUBSTITUTE (A1,” “,REPT(” “,99)))-50),99)) Explanation In the example shown, …

Continue Reading

How to extract text between parentheses in Excel

by

To extract text between parentheses, braces, brackets, etc. you can use a formula based on the MID function, with help from SEARCH function. Formula =MID(text,SEARCH(“(“,text)+1,SEARCH(“)”, text)-SEARCH(“(“,text)-1) Explanation In the example shown, the formula in C5 is: =MID(B5,SEARCH(“(“,B5)+1,SEARCH (“)”,B5)-SEARCH(“(“,B5)-1)+0 How this formula works The foundation of this formula is the MID function, which extracts a specific …

Continue Reading

Extract word that begins with specific character in Excel

by

To extract words that begin with a specific character, you can use a formula based on six functions: TRIM, LEFT, SUBSTITUTE, MID, LEN, and REPT. This approach is useful if you need to extract things like a Twitter user name from a cell that contains other text. Formula =TRIM(LEFT(SUBSTITUTE(MID(text,FIND(“@”, txt),LEN(text)),” “,REPT(” “,100)),100)) Note: 100 represents the longest …

Continue Reading

Split dimensions into three parts in Excel

by

To split dimensions that like 100x50x25 into three separate parts, you can use some rather complicated formulas that use LEFT, MID, RIGHT, FIND, LEN, and SUBSTITUTE. Note: you can also use Flash Fill in Excel 2013 and above, and the “text to columns” feature in older versions of Excel. Both approaches are quite a bit …

Continue Reading

How to translate letters to numbers in Excel

by

To translate letters in a string to numbers, you can use an array formula based on the TEXTJOIN and VLOOKUP functions, with a defined translation table to provide the necessary lookups. Formula {=TEXTJOIN(“”,1,VLOOKUP(T(IF(1,MID(A1,ROW (INDIRECT(“1:”&LEN(A1))),1))),xtable,2,0))} Explanation In the example shown, the formula in C5 is: {=TEXTJOIN(“”,1,VLOOKUP(T(IF(1,MID(B5,ROW (INDIRECT(“1:”&LEN(B5))),1))),xtable,2,0))} where “xtable” is the named range E5:F10. Note: this is an array …

Continue Reading

How to strip numeric characters from cell in Excel

by

To remove numeric characters from a text string, you can try this experimental formula based on the TEXTJOIN function, new in Excel 2016. Formula {=TEXTJOIN(“”,TRUE,IF(ISERR(MID(A1, ROW(INDIRECT(“1:100”)),1)+0), MID(A1,ROW(INDIRECT(“1:100″)),1),””))} Explanation In the example shown, the formula in C5 is: =TEXTJOIN(“”,TRUE,IF(ISERR(MID(B5, ROW(INDIRECT(“1:100”)),1)+0), MID(B5,ROW(INDIRECT(“1:100″)),1),””)) Note: this is an array formula and must be entered with control + shift + …

Continue Reading

How to strip non-numeric characters in Excel

by

To remove non-numeric characters from a text string, you can try this experimental formula based on the TEXTJOIN function, new in Excel 2016. Formula {=TEXTJOIN(“”,TRUE,IFERROR(MID(A1,ROW (INDIRECT(“1:100″)),1)+0,””))} Note: TEXTJOIN will return the numbers as text, for example “100,”500″, etc. If you want a true numeric result, add zero, or wrap the entire formula in the VALUE function. TEXTJOIN was added …

Continue Reading

How to strip html from text or numbers in Excel

by

To strip html or other markup from values in cells, you can use the MID function. Formula =MID(text,start,LEN(text)-markup_len) Explanation In the example shown, the formula in C5 is: =MID(B5,4,LEN(B5)-7) How this formula works The MID function returns characters using a fixed starting point and ending point. In this case, the markup consists of the html …

Continue Reading

How to extract nth word from text string in excel

by

If you need to get the nth word in a text string (i.e. a sentence, phrase, or paragraph) you can so with a clever (and intimidating) formula that combines 5 Excel functions: MID, SUBSTITUTE, TRIM,  REPT, and LEN.  Formula =TRIM(MID(SUBSTITUTE(A1,” “,REPT(” “,LEN(A1))), (N-1)*LEN(A1)+1, LEN(A1))) Explanation How this formula works At the core, this formula takes …

Continue Reading

How to extract multiple lines from a cell in Excel

by

To extract lines from a multi-line cell, you can use  a clever (and intimidating) formula that combines 5 Excel functions: SUBSTITUTE, REPT, TRIM, MID,  and LEN. Formula =TRIM(MID(SUBSTITUTE(A1,delim,REPT (” “,LEN(A1))), (N-1)*LEN(A1)+1, LEN(A1))) Explanation In the example shown, the formula in D5 is: =TRIM(MID(SUBSTITUTE($C5,CHAR(10),REPT (” “,LEN($C5))), (D$4-1)*LEN($C5)+1, LEN($C5))) How this formula works At the core, this formula …

Continue Reading

Extract middle name from full name — Manipulating NAMES in Excel

by

If you need to get the middle name from a full name, and you already have the first and last names in separate cells, you can use a formula that extracts the middle name using the MID and LEN functions, with help from TRIM function. Note: this is a pretty sloppy formula, but will work …

Continue Reading

How to extract last two words from text string in Excel

by

To extract the last two words from a cell, you can use a formula built with several Excel functions, including MID, FIND, SUBSTITUTE, and LEN. Formula =MID(A1,FIND(“@”,SUBSTITUTE(A1,” “,”@”,LEN(A1)-LEN(SUBSTITUTE(A1,” “,””))-1))+1,100) Explanation In the example shown, the formula in C5 is: =MID(B5,FIND(“@”,SUBSTITUTE(B5,” “,”@”,LEN(B5)-LEN(SUBSTITUTE(B5,” “,””))-1))+1,100) How this formula works At the core, this formula uses the MID function to …

Continue Reading

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

  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel TRUE Function
  • OR function Examples in Excel
  • SWITCH function example in Excel
  • Invoice status with nested if in Excel

Date Time

  • Sum race time splits in Excel
  • Display the current date and time in Excel
  • MINUTE function: Description, Usage, Syntax, Examples and Explanation
  • Add decimal minutes to time in Excel
  • How to calculate future date say 6 months ahead in Excel

Grouping

  • If cell contains one of many things in Excel
  • Group times into 3 hour buckets in Excel
  • How to randomly assign people to groups in Excel
  • Categorize text with keywords in Excel
  • Map inputs to arbitrary values in Excel

General

  • How to get original number from percent change in Excel
  • List sheet names with formula in Excel
  • Excel Ribbon Quick Overview For Beginners
  • Basic numeric sort formula in Excel
  • Split Cell Content Using Text to Columns in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning