109k views
0 votes
Spreadsheet cell c2 contains the text string ""deviation"" to return the substring ""dev"" what is the correct syntax

2 Answers

1 vote

Final answer:

To return the substring "dev" from the text string "deviation" in cell C2 of a spreadsheet, use the syntax =LEFT(C2, 3). This formula returns the first three characters from the left of the original string.

Step-by-step explanation:

To extract a substring from a text string in a spreadsheet cell, you can use the LEFT, MID, or RIGHT functions depending on where the substring is located within the original string. In this case, the original string is "deviation" and you want to return "dev", which is the first three characters from the left of the text string in cell C2. The correct syntax using the LEFT function to accomplish this in most spreadsheet applications would be:

=LEFT(C2, 3)

This formula tells the spreadsheet to look in cell C2 and return the three leftmost characters from the text it contains.

User Instein
by
8.2k points
5 votes

Final answer:

To extract the substring "dev" from the text string "deviation" in cell C2, the correct formula is =MID(C2, 1, 3). This uses the MID function to start at the first character and return the next three characters.

Step-by-step explanation:

To extract the substring "dev" from the text string "deviation" in cell C2 of a spreadsheet, you can use the MID function. The MID function is used to return a specific number of characters from a text string, starting at the position you specify. The syntax for the MID function is MID(text, start_num, num_chars), where text is the text string containing the characters you want to extract, start_num is the position of the first character you want to return, and num_chars is the number of characters to return from the text string.

In this case, you want to extract the first three characters from the text string in cell C2, so the correct formula would be: =MID(C2, 1, 3). This formula starts at the first character of the text in cell C2 and returns the next three characters, resulting in the substring "dev".

User Tasheria
by
8.2k points