Excel Office

Excel How Tos, Tutorials, Tips & Tricks, Shortcuts

Category: Text Functions

Excel TEXT functions return a number in a specified number format

BAHTTEXT function: Description, Usage, Syntax, Examples and Explanation

What is BAHTTEXT function in Excel? BAHTTEXT function is one of TEXT functions in Microsoft Excel that converts a number to Thai text and adds a suffix of “Baht.” You can change the Baht format to a different style in the Excel desktop application by using Regional and Language Options (Windows Start menu, Control Panel). Syntax of BAHTTEXT function BAHTTEXT(number) The BAHTTEXT function syntax has the…

ASC function: Description, Usage, Syntax, Examples and Explanation

What is ASC function in Excel? ASC function is one of TEXT functions in Microsoft Excel that changes full-width (double-byte) characters to half-width (single-byte) characters. Syntax of ASC function ASC(text) The ASC function syntax has the following arguments: Text    Required. The text or a reference to a cell that contains the text you want to change. If text does not contain any…

CLEAN function: Description, Usage, Syntax, Examples and Explanation

What is CLEAN function in Excel? CLEAN function is one of TEXT functions in Microsoft Excel that removes all nonprintable characters from text. Use CLEAN on text imported from other applications that contains characters that may not print with your operating system. For example, you can use CLEAN to remove some low-level computer code that is frequently at the beginning…

CODE function: Description, Usage, Syntax, Examples and Explanation

What is CODE function in Excel? CODE function is one of TEXT functions in Microsoft Excel that returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer. Operating environment Character set Macintosh Macintosh character set Windows ANSI Syntax of CODE function CODE(text) The CODE function syntax has…

CONCAT function: Description, Usage, Syntax, Examples and Explanation

What is CONCAT function in Excel? CONCAT function is one of TEXT functions in Microsoft Excel that combines the text from multiple ranges and/or strings, but it doesn’t provide the delimiter or IgnoreEmpty arguments. Tip: To include delimiters (such as spacing or ampersands (&) between the texts you want to combine and to remove empty arguments you don’t want to appear…

CONCATENATE function: Description, Usage, Syntax, Examples and Explanation

What is CONCATENATE function in Excel? CONCATENATE function is one of TEXT functions in Microsoft Excel that is used to join two or more text strings into one string. Syntax: CONCATENATE(text1, [text2], …)For example: =CONCATENATE(“Stream population for “, A2, ” “, A3, ” is “, A4, “/mile.”) =CONCATENATE(B2, ” “,C2) Important: In Excel 2016, Excel Mobile, and Excel Online, this function has been…

DBCS function: Description, Usage, Syntax, Examples and Explanation

What is DBCS function in Excel? DBCS function is one of TEXT functions in Microsoft Excel that converts half-width (single-byte) letters within a character string to full-width (double-byte) characters. The name of the function (and the characters that it converts) depends upon your language settings. For Japanese, this function changes half-width (single-byte) English letters or katakana within a character string…

DOLLAR function: Description, Usage, Syntax, Examples and Explanation

What is DOLLAR function in Excel? DOLLAR function is one of TEXT functions in Microsoft Excel that converts a number to text using currency format, with the decimals rounded to the number of places you specify. DOLLAR uses the $#,##0.00_);($#,##0.00) number format, although the currency symbol that is applied depends on your local language settings. Syntax of DOLLAR function DOLLAR(number, [decimals]) The DOLLAR…

EXACT function: Description, Usage, Syntax, Examples and Explanation

What is EXACT function in Excel? EXACT function is one of TEXT functions in Microsoft Excel that compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. EXACT is case-sensitive but ignores formatting differences. Use EXACT to test text being entered into a document. Syntax of EXACT function EXACT(text1, text2) The EXACT function syntax has the…

FIXED function: Description, Usage, Syntax, Examples and Explanation

What is FIXED function in Excel? FIXED function is one of TEXT functions in Microsoft Excel that rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text. Syntax of FIXED function FIXED(number, [decimals], [no_commas]) The FIXED function syntax has the following arguments: Number: The number…

LEFT, LEFTB functions: Description, Usage, Syntax, Examples and Explanation

What are LEFT, LEFTB functions in Excel? LEFT, LEFTB functions are  TEXT functions in Microsoft Excel. LEFT returns the first character or characters in a text string, based on the number of characters you specify. While, LEFTB returns the first character or characters in a text string, based on the number of bytes you specify. Important: These functions may not be…

LEN, LENB functions: Description, Usage, Syntax, Examples and Explanation

What are LEN, LENB functions in Excel? LEN, LENB functions are TEXT functions in Microsoft Excel. LEN returns the number of characters in a text string.While, LENB returns the number of bytes used to represent the characters in a text string. Important: These functions may not be available in all languages. LENB counts 2 bytes per character only when a DBCS…

LOWER function: Description, Usage, Syntax, Examples and Explanation

What is LOWER function in Excel? LOWER function is one of TEXT functions in Microsoft Excel that converts all uppercase letters in a text string to lowercase. Syntax of LOWER function LOWER(text) The LOWER function syntax has the following arguments: Text: The text you want to convert to lowercase. LOWER does not change characters in text that are not letters. Example…

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

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 position you specify, based on…

NUMBERVALUE function: Description, Usage, Syntax, Examples and Explanation

What is NUMBERVALUE function in Excel? NUMBERVALUE function is one of TEXT functions in Microsoft Excel that converts text to a number, in a locale-independent way. Syntax of NUMBERVALUE function NUMBERVALUE(Text, [Decimal_separator], [Group_separator ]) The NUMBERVALUE function syntax has the following arguments. Text: The text to convert to a number. Decimal_separator(Optional): The character used to separate the integer and fractional part…

PROPER function: Description, Usage, Syntax, Examples and Explanation

What is PROPER function in Excel? PROPER function is one of TEXT functions in Microsoft Excel that capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter. Converts all other letters to lowercase letters. Syntax of PROPER function PROPER(text) The PROPER function syntax has the following arguments: Text: Text enclosed…

REPLACE, REPLACEB functions: Description, Usage, Syntax, Examples and Explanation

What are REPLACE, REPLACEB functions in Excel? REPLACE, REPLACEB functions TEXT functions in Microsoft Exce. REPLACE replaces part of a text string, based on the number of characters you specify, with a different text string. While REPLACEB replaces part of a text string, based on the number of bytes you specify, with a different text string. Important: These functions may…

REPT function: Description, Usage, Syntax, Examples and Explanation

What is REPT function in Excel? REPT function is one of TEXT functions in Microsoft Excel that repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string. Syntax of REPT function REPT(text, number_times) The REPT function syntax has the following arguments: Text    Required. The text you want to repeat. Number_times    Required.…

SEARCH, SEARCHB functions: Description, Usage, Syntax, Examples and Explanation

What are SEARCH, SEARCHB functions in Excel? SEARCH, SEARCHB functions are TEXT functions in Microsoft Excel that locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string. Syntax of SEARCH, SEARCHB functions SEARCH(find_text,within_text,[start_num]) SEARCHB(find_text,within_text,[start_num]) The SEARCH and SEARCHB functions have the following…

SUBSTITUTE function: Description, Usage, Syntax, Examples and Explanation

 What is SUBSTITUTE function in Excel? SUBSTITUTE function is one of TEXT functions in Microsoft Excel that substitutes new_text for old_text in a text string. Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string. Syntax of SUBSTITUTE function…

CHAR function: Description, Usage, Syntax, Examples and Explanation

What is CHAR function in Excel? CHAR function is one of TEXT functions in Microsoft Excel that returns the character specified by a number. Use CHAR to translate code page numbers you might get from files on other types of computers into characters. Operating environment Character set Macintosh Macintosh character set Windows ANSI The ANSI character set was the standard…

UPPER function: Description, Usage, Syntax, Examples and Explanation

What is UPPER function in Excel? UPPER function is one of TEXT functions in Microsoft Office Excel that converts text to uppercase. Syntax of UPPER function UPPER(text) The UPPER function syntax has the following arguments: Text: The text you want converted to uppercase. Text can be a reference or text string. Example of UPPER function Steps to follow: 1. Open a new Excel…

PHONETIC function: Description, Usage, Syntax, Examples and Explanation

What is PHONETIC function in Excel? PHONETIC function is one of TEXT functions in Microsoft Office Excel that extracts the phonetic (furigana) characters from a text string. Syntax of PHONETIC function PHONETIC(reference) The PHONETIC function syntax has the following arguments: Reference: Text string or a reference to a single cell or a range of cells that contain a furigana text string. PHONETIC…

T function: Description, Usage, Syntax, Examples and Explanation

What is T function in Excel? T function is one of TEXT functions in Microsoft Office Excel that returns the text referred to by value. Syntax of T function T(value) The T function syntax has the following arguments: Value: The value you want to test. T formula explanation If value is or refers to text, T returns value. If value does not…

TEXTJOIN function: Description, Usage, Syntax, Examples and Explanation

What is TEXTJOIN function in Excel? TEXTJOIN function is one of TEXT functions in Microsoft Office Excel that TEXTJOIN function combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined. If the delimiter is an empty text string, this function will effectively concatenate the ranges. Note: This feature is available…

UNICODE function: Description, Usage, Syntax, Examples and Explanation

What is UNICODE function in Excel? UNICODE function is one of TEXT functions in Microsoft Office Excel that returns the number (code point) corresponding to the first character of the text. Syntax of UNICODE function UNICODE(text) The UNICODE function syntax has the following arguments. Text: Text is the character for which you want the Unicode value. UNICODE formula explanation If text…

UNICHAR function: Description, Usage, Syntax, Examples and Explanation

What is UNICHAR function in Excel? UNICHAR function on is one of TEXT functions in Microsoft Office Excel that returns the Unicode character that is referenced by the given numeric value. Syntax of UNICHAR function UNICHAR(number) The UNICHAR function syntax has the following arguments. Number    Required. Number is the Unicode number that represents the character. UNICHAR formula explanation The Unicode character…

TRIM function: Description, Usage, Syntax, Examples and Explanation

What is TRIM function in Excel? TRIM function is one of TEXT functions in Microsoft Office Excel that removes all spaces from text except for single spaces between words. Use TRIM on text that you have received from another application that may have irregular spacing. Important: The TRIM function was designed to trim the 7-bit ASCII space character (value 32) from…

TEXT function: Description, Usage, Syntax, Examples and Explanation

What is TEXT function in Excel? TEXT function is one of Microsoft Office Excel TEXT functions that lets you change the way a number appears by applying formatting to it with format codes. It’s useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with text or symbols. Note: The TEXT function…

FIND, FINDB functions: Description, Usage, Syntax, Examples and Explanation

What are FIND, FINDB functions in Excel? FIND and FINDB are Text functions in Microsoft Excel that locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string. Important: FIND is intended for use with languages that use the single-byte character set (SBCS),…

How to split text string at specific character in Excel

To split a text string at a certain character, you can use a combination of the LEFT, RIGHT, LEN, and FIND functions. Formula =LEFT(text,FIND(character,text)-1) Explanation In the example shown, the formula in C5 is: =LEFT(B5,FIND(“_”,B5)-1) And the formula in D5 is: =RIGHT(B5,LEN(B5)-FIND(“_”,B5)) How these formulas work The first formula uses the FIND function to locate the underscore(_) in the text,…

How to split text with delimiter in Excel

To split text at an arbitrary delimiter (comma, space, pipe, etc.) you can use a formula based on the TRIM, MID, SUBSTITUTE, REPT, and LEN functions. Formula =TRIM(MID(SUBSTITUTE(A1,delim,REPT (” “,LEN(A1))),(N-1)*LEN(A1)+1,LEN(A1))) Explanation In the example shown, the formula in C5 is: =TRIM(MID(SUBSTITUTE($B5,”|”, REPT(” “,LEN($B5))),(C$4-1)* LEN($B5)+1,LEN($B5))) Note: references to B5 and C4 are mixed references to allow the formula to be copied across and…

How to strip html from text or numbers in Excel

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 bold tag, which appears at…

How to strip non-numeric characters in Excel

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 in Excel 2016 + Office…

How to strip numeric characters from cell in Excel

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 + enter. How this formula works…

How to translate letters to numbers in Excel

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 formula and must be entered with…

How to remove trailing slash from url in Excel

To remove a trailing slash from a URL or path, you can use a formula based on the LEFT and LEN functions. Formula =LEFT(url,LEN(B4)-(RIGHT(url)=”/”)) Explanation In the example shown, the formula in cell C6 is: =LEFT(B4,LEN(B4)-(RIGHT(B4)=”/”)) How this formula works At the core, this formula uses the LEFT function to return text starting from the left. To work out how…

How to strip protocol and trailing slash from URL in Excel

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 the text in a URL…

How to get top level domain (TLD) in Excel

To extract the top level domain (called “TLD”)  from a list of domain names or email addresses, you can use a rather complex formula that uses several functions. In the formula below, domain represents a domain or email address in normal “dot” syntax. Formula =RIGHT(domain,LEN(domain)-FIND(“*”,SUBSTITUTE(domain,”.”,”*”, LEN(domain)-LEN(SUBSTITUTE(domain,”.”,””))))) Explanation In the example, the active cell contains this formula: =RIGHT(B4,LEN(B4)-FIND(“*”,SUBSTITUTE(B4,”.”,”*”,LEN(B4)-LEN(SUBSTITUTE(B4,”.”,””))))) How the formula works:…