VBA TEXT functions help you to manipulate text value(s) from a cell, range of cells, or from an entire worksheet or workbook. In simple words, these functions are specifically built for changing text values.
Below we have a list of 18 TEXT functions that you can learn to use:
Name Description VBA FORMAT Function It helps you to apply a specific format and then return that string in the result. VBA INSTR Function It looks for a sub-string from a string and returns the starting position of the sub-string in the result. VBA INSTRREV Function It also looks for a substring from a string and returns the starting position of the sub-string in the result (looking from right to left.) VBA LCASE Function It converts a string into a lower case string where you have all the characters small. VBA LEFT Function Return a substring from a string using the count of characters supplied (starting from the left side of the string). VBA LEN Function It counts the number of characters from the supplied value and returns a number as the count of those characters. VBA LTRIM Function It removes the leading spaces (from the left side) from a string and returns that string without those spaces in the result. VBA MID Function Return a substring from a string using the starting position and count of characters supplied. VBA REPLACE Function It finds a substring from a string and replaces it with another substring and returns the new string in the result. VBA RIGHT Function Return a substring from a string using the count of characters supplied (starting from the right side of the string). VBA RTRIM Function It removes the trailing spaces (from the right side) from a string and returns that string without those spaces in the result. VBA SPACE Function It creates a string with a specified number of spaces by the user and returns it in the result. VBA STRCOMP Function It compares two strings and returns the result as an integer. VBA STRCONV Function It converts a string into a specific format and returns a new string in the result. VBA STRING Function It takes a character and repeat it a number of times and return it in the result as a string. VBA STRREVERSE Function It reverses a string and returns it in the result. VBA TRIM Function It removes the spaces from the starting and ending of a string and returns a new string in the result. VBA UCASE Function It converts a string into an upper case string where you have all the characters are in the capital.