AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Contents · Computing

Text and logical functions

Lessons 9–10 · 2 lessons · N. I. Taylaqov (general editor), A. B. Akhmedov, M. D. Pardayeva, A. A. Abdug‘aniyev, U. M. Mirsanov. Informatics and Information Technologies, Grade 10, 1st edition. “Extremum-Press”, Tashkent, 2017
9

Text functions

Textbook: pp. 25–26
GoalWorks with text using the text functions LEN, &, CONCATENATE, REPT, REPLACE, TEXT and VALUE.
New words
text string: characters in quotation marks, for example "Ali" · matn satriconcatenation: the & operator joins pieces of text into one · birlashtirish (&)LEN: counts the characters in a text, spaces included · LENVALUE: converts a text that looks like a number into a real number · VALUE
Explanation

In Excel text takes part in formulas just like numbers: a text string is put in double quotation marks. LEN(text) counts the characters, and spaces count too. To join texts the & operator is used: =A1&" "&B1; CONCATENATE(text1, text2, …) does the same, and newer Excel also has CONCAT and TEXTJOIN. REPT(text, n) repeats a text n times. REPLACE(old_text, start, number_of_characters, new_text) replaces the given part of a string. TEXT(value, format) turns a number into text in the given form, for example TEXT(7,"000") = “007”; VALUE(text) turns a text that looks like a number back into a number. A number stored as text is ignored by the SUM function, which is why VALUE is useful. When you practise with lists, use invented names: do not put the personal data of real people into shared tables.

FunctionJob
LEN(text)number of characters
&, CONCATENATEjoining texts
REPT(text, n)repeat n times
REPLACE(old_text, start, number_of_characters, new_text)replace a part
TEXT(value, format)number to text
VALUE(text)text to number
💡 Where will I use this?
In real life

A school library gives each book a code made of a subject letter and a serial number. Instead of typing them one by one, the librarian uses a formula that joins the letter and the number. Hundreds of codes come out in the same pattern with fewer typing slips.

Who uses it

Librarians, office staff and data-cleaning specialists use functions that join text and check its length.

Try it today

Count the letters in the word “school”. Then write “book”, “shelf” and a single blank space on three paper cards and join them in different orders.

Worked examples
C1fx=A1&" "&B1
ABC
1AzizaKarimovaAziza Karimova
A1 holds “Aziza” and B1 holds “Karimova”. =A1&" "&B1 gives “Aziza Karimova”, while =CONCATENATE(B1,", ",A1) gives “Karimova, Aziza”. A space is also text, so it must be written inside quotation marks.
FormulaResult
=LEN("Informatika")11
=REPT("*",5)*****
=REPLACE("Tashkent-5",10,1,"7")Tashkent-7
=TEXT(7,"000")007
=VALUE("45")+550
=LEN("Informatika") = 11; =REPT("*",5) = “*****”; =REPLACE("Tashkent-5",10,1,"7") = “Tashkent-7” (the 10th character was replaced); =TEXT(7,"000") = “007”; =VALUE("45")+5 = 50.
Class activity

“The text builder”: each pair writes an invented surname, first name and class in three cells and builds an entry such as “Surname I., class” with one formula; a neighbouring pair checks the result.

Practice
1
What is the result of =LEN("Informatika")?
2
What text does =REPT("ab",3) give?
3
A2 holds a first name and B2 a surname. Write a formula that joins them as “Surname Name” with a space.
4
Why is VALUE needed for the number 45 stored as text?
Story of the Week · The Khwarizmi WayTeachers’ Day: the “free card” messageClose the week: all of this week’s subjects in one storyRead →