You are on page 1of 8

MODULE IN

IT Application Tools in Business

AE314

Computer Applications Department

School of Accountancy, Management, Computing and Information Studies

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited.
Module 03: Computer Applications in Business
Unit 02: Spreadsheet Management

Once you’ve practiced already the manner on how to compose functions and use them, we move on to TEXT FUNCTIONS.
Text functions, as the name indicates, applies to text as their data type. These functions allow you to manipulate text for
easier sorting, filtering, and reporting later on.

Unit 02-06: Text Functions

Function Name CONCATENATE


Type of Function Text
Description Joins several text strings into one string
Syntax =CONCATENATE(text1, [text2], …)
 text1 – required, the first item to join. The item can be a text value, number, or cell
reference.
 text2 – optional, additional text items to join. You can have up to 255 items, up to a total of
8,192 characters.
Remarks  Has been replaced by the CONCAT function in newer versions.
 The ampersand (&) symbol may also be used to join text strings together.
 Use commas to separate adjoining text items. For example: Excel will display
=CONCATENATE("Hello ""World") as Hello"World with an extra quote mark because a
comma between the text arguments was omitted.
 Numbers don't need to have quotation marks.
 Without designated spaces between separate text entries, the text entries will run
together. Add extra spaces as part of the CONCATENATE formula.

Example of CONCATENATE:
A B C D
1 Data Formula
2 brook trout Andreas Hauser =CONCATENATE("Stream population for ", A2, " ", A3, " is ", A4, "/mile.")
3 species Fourth Pine =CONCATENATE(B2, " ", C2)
4 32 =CONCATENATE(C2, ", ", B2)
5 =CONCATENATE(B3, " & ", C3)
6 =B3 & " & " & C3
7 Result
8 Stream population for brook trout species is 32/mile.
9 Andreas Hauser
10 Andreas, Hauser
11 Fourth & Pine
12 Fourth & Pine

Some of the text functions’ results are numbers, that can be used as arguments to other functions, and can be used to
analyze your data.
Function Name LEFT
Type of Function Text - Extraction
Description Returns the first character or characters in a text string or cell, based on the number of characters
you specify.
Syntax =LEFT(text, [num_chars])
 text – required, the text string that contains the characters you want to extract.
 num_chars – optional, specifies the number of characters you want LEFT to extract.
Remarks  Num_chars must be greater than or equal to zero.
 If num_chars is greater than the length of text, LEFT returns all of text.
 If num_chars is omitted, it is assumed to be 1.

Example of LEFT:

A B C D
1 Data Formula Result Description
2 Baguio =LEFT(A2, 3) Bag The first three characters in the string
3 SLU =LEFT(A3) S The first character in the string

Function Name RIGHT


Type of Function Text – Extraction
Description Returns the last character or characters in a text string, based on the number of characters you
specify.
Syntax =RIGHT(text, [num_chars])
 text – required, the text string that contains the characters you want to extract.
 num_chars – optional, specifies the number of characters you want RIGHT to extract.
Remarks  Num_chars must be greater than or equal to zero.
 If num_chars is greater than the length of text, RIGHT returns all of text.
 If num_chars is omitted, it is assumed to be 1.

Example of RIGHT:

A B C D
1 Data Formula Result Description
2 Baguio =RIGHT(A2, 4) guio The last four characters in the string
3 SLU =RIGHT(A3) U The last character in the string

Function Name MID


Type of Function Text - Extraction
Description Returns a specific number of characters from a text string, starting at the position you specify,
based on the number of characters you specify.
Syntax =MID(text, start_num, num_chars)
 Text – required, the text string containing the characters you want to extract.
 start_num – required, the position of the first character you want to extract in text. The
first character in text has start_num 1, and so on.
 num_chars – required, specifies the number of characters you want MID to return from
text.
Remarks  If start_num is greater than the length of text, MID/MIDB returns "" (empty text).
 If start_num is less than the length of text, but start_num plus num_chars exceeds the
length of text, MID/MIDB returns the characters up to the end of text.
 If start_num is less than 1, MID/MIDB returns the #VALUE! error value.
 If num_chars is negative, MID returns the #VALUE! error value.
Example of MID:

A B C D
1 Data Formula Result Description
2 Baguio City =MID(A2, 3, 4) guio From the third position, four characters.
3 Saint Louis =MID(A3, 7, 5) Louis From the seventh position, five characters.

Function Name LEN


Type of Function Text
Description Returns the number of characters in a text string
Syntax =LEN(text)
 text – required, the text whose length you want to find. Spaces count as characters.

Example of LEN:

A B C
1 Data Formula Result
2 Saint Louis University =LEN(A2) 22
3 Kay Audrey Urbano =LEN(A3) 17

Function Name LOWER


Type of Function Text – Formatting
Description Converts all text string to lowercase format
Syntax =LOWER(text)
 text – required, the text you want to convert to lowercase. LOWER does not change
characters in text that are not letters.

Example of LOWER:

A B C
1 Data Formula Result
2 sAinT LoUIs unIvErsITy =LOWER(A2) saint louis university

Function Name PROPER


Type of Function Text - Formatting
Description Capitalizes the first letter in a text string and any other first letter in the text or words that follow.
Converts all other letters to lowercase letters.
Syntax =PROPER(text)
 text – required, text enclosed in quotation marks, a formula that returns text, or a
reference to a cell containing the text you want to partially capitalize.

Example of PROPER:

A B C
1 Data Formula Result
2 sAinT LoUIs unIvErsITy =PROPER(A2) Saint Louis University
Function Name UPPER
Type of Function Text – Formatting
Description Converts text to uppercase.
Syntax =UPPER(text)
 text – required, the text you want converted to uppercase. Text can be a reference or text
string.

Example of UPPER:
A B C
1 Data Formula Result
2 sAinT LoUIs unIvErsITy =UPPER(A2) SAINT LOUIS UNIVERSITY

Function Name REPT


Type of Function Text
Description Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text
string.
Syntax =REPT(text, number_times)
 text – required, the text you want to repeat.
 number_times – required, a positive number specifying the number of times to repeat text.
Remarks  If number_times is 0 (zero), REPT returns "" (empty text).
 If number_times is not an integer, it is truncated.
 The result of the REPT function cannot be longer than 32,767 characters, or REPT returns
#VALUE!.
Example of REPT:

A B C
1 Formula Result Description
2 =REPT("*-", 3) *-*-*- Displays an asterisk and a dash (*-) 3 times.
3 =REPT("-",10) ---------- Displays a dash (-) 10 times.

Function Name TRIM


Type of Function Text
Description 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.
Syntax =TRIM(text)
 text – required, the text from which you want spaces removed.

Example of TRIM:

A B C
1 Data Formula Result
2 Saint Louis University =TRIM(A2) Saint Louis University
Function Name SUBSTITUTE
Type of Function Text
Description 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 =SUBSTITUTE(text, old_text, new_text, [instance_num])
 text – required, the text or the reference to a cell containing text for which you want to
substitute characters.
 old_text – required, the text you want to replace.
 new_text – required, the text you want to replace old_text with.
 instance_num – optional, specifies which occurrence of old_text you want to replace with
new_text. If you specify instance_num, only that instance of old_text is replaced.
Otherwise, every occurrence of old_text in text is changed to new_text.

Example of SUBSTITUTE:
A B C D
1 Data Formula Result Description
2 Sales Data =SUBSTITUTE(A2, "Sales", "Cost") Cost Data Substitutes Cost for Sales
3 Quarter 1, 2020 =SUBSTITUTE(A3, "1", "2", 1) Quarter 2, 2020 Substitutes first instance of "1" with "2"
4 Quarter 1, 2011 =SUBSTITUTE(A4, "1", "2", 3) Quarter 1, 2012 Substitutes third instance of "1" with "2"

Function Name REPLACE


Type of Function Text
Description Replaces part of a text string, based on the number of characters you specify, with a different text
string.
Syntax =REPLACE(old_text, start_num, num_chars, new_text)
 Old_text – Required. Text in which you want to replace some characters.
 Start_num – Required. The position of the character in old_text that you want to replace
with new_text.
 Num_chars – Required. The number of characters in old_text that you want REPLACE to
replace with new_text.
 New_text – Required. The text that will replace characters in old_text.
Remarks  Always counts each character, whether single-byte or double-byte, as 1, no matter what
the default language setting is.

Example of REPLACE:

A B C D
1 Data Formula Description Result
abcdefghijk =REPLACE(A2,6,5,"*") Replaces five characters in abcdefghijk with a single * abcde*k
2
character, starting with the sixth character (f).
3 2009 =REPLACE(A3,3,2,"10") Replaces the last two digits (09) of 2009 with 10. 2010
123456 =REPLACE(A4,1,3,"@") Replaces the first three characters of 123456 with a single @ @456
4
character.
Function Name VALUE
Type of Function Text
Description Converts a text string that represents a number to a number.
Syntax =VALUE(text)
 Text – Required. The text enclosed in quotation marks or a reference to a cell containing
the text you want to convert.
Remarks  Text can be in any of the constant number, date, or time formats recognized by Microsoft
Excel. If text is not in one of these formats, VALUE returns the #VALUE! error value.
 You do not generally need to use the VALUE function in a formula because Excel
automatically converts text to numbers as necessary. This function is provided for
compatibility with other spreadsheet programs.

Example of VALUE:
A B C
1 Formula Description Result
2 =VALUE("$1,000") Number equivalent of the text string "$1,000" 1000
=VALUE("16:48:00")-VALUE("12:00:00") The serial number equivalent to 4 hours and 48 minutes, which is 0.2
3
"16:48:00" minus "12:00:00" (0.2 = 4:48).

Function Name FIND


Type of Function Text
Description FIND locates one text string within a second text string or cell, and returns the number of the
starting position of the first text string from the first character of the cell or second text string.
Syntax =FIND(find_text, within_text, [start_num])
 Find_text – Required. The text you want to find.
 Within_text – Required. The text containing the text you want to find.
 Start_num – Optional. Specifies the character at which to start the search. The first
character in within_text is character number 1. If you omit start_num, it is assumed to be
1.
Remarks  FIND always counts each character
 FIND is a case-sensitive function
 If find_text is "" (empty text), FIND matches the first character in the search string (that is,
the character numbered start_num or 1).
 Find_text cannot contain any wildcard characters.
 If find_text does not appear in within_text, FIND and FINDB return the #VALUE! error
value.
 If start_num is not greater than zero, FIND and FINDB return the #VALUE! error value.
 If start_num is greater than the length of within_text, FIND and FINDB return the #VALUE!
error value.

Example of FIND:
A B C
1 Data
2 Miriam McGovern
3 Formula Description Result
4 =FIND("M",A2) Position of the first "M" in cell A2 1
5 =FIND("m",A2) Position of the first "M" in cell A2 6
6 =FIND("M",A2,3) Position of the first "M" in cell A2, starting with the third character 8
Function Name SEARCH
Type of Function Text
Description Locates one text string within a cell or second text string, and return the number of the starting
position of the first text string from the first character of the cell or second text string.
Syntax =SEARCH(find_text,within_text,[start_num])
 find_text – Required. The text that you want to find.
 within_text – Required. The text in which you want to search for the value of the find_text
argument.
 start_num – Optional. The character number in the within_text argument at which you
want to start searching.
Remarks  This function is NOT case-sensitive
 You can use the wildcard characters — the question mark (?) and asterisk (*) — in the
find_text argument. A question mark matches any single character; an asterisk matches
any sequence of characters. If you want to find an actual question mark or asterisk, type a
tilde (~) before the character.
 If the value of find_text is not found, the #VALUE! error value is returned.
 If the start_num argument is omitted, it is assumed to be 1.
 If start_num is not greater than 0 (zero) or is greater than the length of the within_text
argument, the #VALUE! error value is returned.

Example of SEARCH:
A B C
1 Data
2 Statements
3 Profit Margin
4 margin
5 The "boss" is here.
6 Formula Description Result
=SEARCH("e",A2,6) Position of the first "e" in the string in cell A2, starting at the 7
7
sixth position.
=SEARCH(A4,A3) Position of "margin" (string for which to search is cell A4) in 8
8
"Profit Margin" (cell in which to search is A3).
=REPLACE(A3,SEARCH(A4,A3), Replaces "Margin" with "Amount" by first searching for the Profit
9 6,"Amount") position of "Margin" in cell A3, and then replacing that character Amount
and the next five characters with the string "Amount."
=MID(A3,SEARCH(" ",A3)+1,4) Returns the first four characters that follow the first space Marg
10
character in "Profit Margin" (cell A3).
11 =SEARCH("""",A5) Position of the first double quotation mark (") in cell A5. 5
=MID(A5,SEARCH("""",A5)+1, Returns only the text enclosed in the double quotation marks in
12 SEARCH("""",A5,SEARCH("""",A5) cell A5. boss
+1)-SEARCH("""",A5)-1)

You might also like