110 likes | 237 Vues
Excel Text Functions MGMI 311. Data Structure. Text is Excel = Array of Characters = String ( when coding) Text Function Array Operation. ASCII code. Most computers use ASCII code to represent text, which makes it possible to transfer data from one computer to another.
E N D
Data Structure • Text is Excel = Array of Characters = String (whencoding) • Text Function Array Operation
ASCII code • Most computers use ASCII code to represent text, which makes it possible to transfer data from one computer to another. • American Standard Code for Information Interchange • The standard ASCII code character set uses just 7 bits for each character
CODE(text) • Returns the ASCII value of a character or the first character in a cell • i.e. the function will return the ASCII value for the first character and ignore all of the characters after the first.
FIND (Find_Text, Within_Text, Start_num) SEARCH (Find_Text, Within_Text, Start_num) • Returns the location of a substring in a string • i.e. FIND is case-sensitive SEARCH is not case-sensitive If No Match, it will return #Value
MID (text, Start, Chars) • Extract a substring from a string (starting at any position) Note • Start = start position (default = 1) • Chars = number of characters
REPLACE (oldText,start_num, Num_chars,New_text) • Replaces a sequence of characters in a string with another set of characters Note • oldText = the original string value • Number_chars = the number of characters to replace the oldText
SUBSTITUTE (Text, oldText,newText, Instance_num) • Replaces a set of characters with another Note • Instance_num = n th appearance of the oldText that you want to replace
Text Functions • Concatenate (Text1, Text2,..., TextX) • Exact (Text1, Text2) • FIXED(Numbers, Decimals, No_comment) • LEFT / RIGHT (Text, Char) • LOWER (Text), PROPER (Text), UPPER (Text)
Logical Function • Logical condition test : logical operators ( return TRUE / FALSE ) e.g. • ISBLANK • ISTEXT • ISNONTEXT • ISNUMBER • ISEVEN / ISODD • ISERROR