Articles in the Text Functions Category
Excel Functions, Text Functions »
This function removes extra blank spaces from the given text. It removes text from text from – the start of the text string, at the end of the text string, and any extra spaces between the words within a text string
Syntax:
= Trim (String)
String: a text string that may contain any extra spaces which needs to cleaned from the string
Example:
Note: In the above example, the extra spaces (represented by ‘|’ symbol) were removed using the Trim() function.
Excel Functions, Text Functions »
This function is used to convert a number, stored as a text, into value
Syntax:
= Value (Number _text)
Number_text: Number stored as a string/text
Example:
In the above example, I have used two functions deliberately to show the actual application of this function. In the above example, the Mid() function extracts the numbers as text, from the string – ‘B99’.
And the function Value() converts the number, extracted as text back into a proper number. The difference between the two is that a number stored as text cannot be used for any calculations, whereas a proper number can be used for calculations
Note: I have used two functions in two different cells in the above example. This, instead can be written as:
= Value( Mid( B3,2,2) )
Excel Functions, Text Functions »
For the below examples, let us assume that cell A1 contains text – My name is Excel Matic
-
>= Substitute (A1, “Excel Matic“, “Mohit Khurana”) – result will be – My name is Mohit Khurana
- = Substitute (A1, “e“, “u“) – result will be – My namu is Excul Matic
- = Substitute (A1, “e“, “u“, 2) – result will be – My name is Excul Matic
Excel Functions, Text Functions »
- = Search (“E”, “Excel Matic”, 1)
- result will be – 1 - = Search (“m”, “Excel Matic”, 1) – result will be – 7
- = Search (“E”, “Excel Matic”, 2) – result will be – 4 (though we started finding ‘e’ from second position, but the functions returns the position relative to original string, without ignoring the initials characters)
- = Search (” “, “Excel Matic”, 1) – result will be – 6 (Spaces, special characters can also be found using this function)
- = Search (“E”, “Excel Matic”, 20) – result will be – #VALUE! (This will return an error as it is not able to find ‘E’ beyond the original length of the text)
- = Search (“G”, “Excel Matic”, 1) – result will be – #VALUE! (This will return an error as it is not able to find ‘G’ which is not present in the Base String)
Excel Functions, Text Functions »
- = Mid (“Excel Matic”,1 , 1) – result will be – E
- = Mid (“Excel Matic”,1 , 2) – result will be – Ex
- = Mid (“Excel Matic”,1 ,31) – result will be – Exc
- = Mid (“Excel Matic”,1 , 4) – result will be – Exce
- e=”font-size:small;”>= Mid (“Excel Matic”,1 , 5) – result will be – Excel
- = Mid (“Excel Matic”,7 , 1) – result will be – M
- = Mid (“Excel Matic”,7 , 2) – result will be – Ma
- = Mid (“Excel Matic”,7 , 3) – result will be – Mat
- = Mid (“Excel Matic”,7 , 4) – result will be – Mati
- = Mid (“Excel Matic”,7 , 5) – result will be – Matic
Excel Functions, Text Functions »
- = Len (“Excel”) – result will be – 5
- = Len (“Matic”) – result will be – 5
- = Len (“ExcelMatic”) – result will be – 10
- = Len (“Excel Matic”) – result will be – 11
- = Len (“## @@ $$”) – result will be – 8 (The string here contains 6 special characters and 2 spaces)
Excel Functions, Text Functions »
- = Find (“e”, “Excel Matic”) – result will be – 4
- = Find (“E”, “Excel Matic”) – result will be – 1
- = Find (“c”, “Excel Matic”) – result will be – 3
- = Find (“c”, “Excel Matic”,5) – result will be – 11
- = Find (“S”, “Excel Matic”) – result will be – #Value!
Excel Functions, Text Functions »
- = Exact (“Excel, “Matic”) – result will be – FALSE
- = Exact (“Excel, “excel”) – result will be – FALSE
- = Exact (“matic, “Matic”) – result will be – FALSE
- = Exact (“Excel, “Excel”) – result will be – TRUE
- = Exact (“Matic, “Matic”) – result will be – TRUE
Text Functions »
Text Functions »
- In cell A1 to cell A10 write any numbers (try not to go beyond 50)
- Now in cell B1 type this function:
= Rept(“l”, a1)
- The character I have used is present on your keyboards above the Return key. You would need to press SHIFT and then the key above return key
- Now copy this function till range B10
The image above uses Rept() to create a bar graph with “l” symbol which represents the frequency given in column A
Text Functions »
n>


