LEFT / RIGHT function: Formulas, usage in Excel

The Left and Right functions are one of the most used functions in word processing groups when working on Excel spreadsheets. Based on the function name, you have probably guessed its use, specifically as follows:

  • LEFT returns the first character or characters in a string, based on the number of characters you specify.
  • RIGHT returns the last character or characters in a string, based on the number of characters you specify.

The LEFT and RIGHT functions always count each character as 1, whether it's a single byte or a double byte, regardless of the default language setting. Character counts include spaces (spaces) and other special characters.

LEFT, RIGHT function formulas in Excel

= LEFT (Text, [num_chars])

= RIGHT (Text, [num_chars])

Explain:

  • Text : is required data. This is the text string containing the characters you want to extract.
  • Num_chars : is optional. This is the number that specifies the number of characters you want to get from the left (LEFT function) or from the right (RIGHT function) to.
    • The number of characters to count must be greater or equal to zero.
    • If this number is not entered, the function will default to 1 character.
    • If the number of characters counted is greater than the length of the text, the function takes the entire text.

How to use LEFT and RIGHT functions?

For example, the original text has the content: Download.com.vn. The corresponding return function will be as follows:

Recipe Results returned
= LEFT ("Download.com.vn"; 8) Download
= RIGHT ("Download.com.vn"; 3) .VN

Applies to specific problems with the Vlookup function

For the main and secondary data tables later, fill in the main data table based on the employee code and data from the 2 secondary tables.

LEFT / RIGHT function: Formulas, usage in Excel

The provisions are as follows : The first 2 characters of the NV Code describe for the job position, the characters at the end describe for the place where employees work. Based on that, we will fill in the formula for calculating each column as follows:

CV position = VLOOKUP ( LEFT (C3; 2) ; $ B $ 22: $ C $ 24; 2; 0)
Workplace = VLOOKUP ( RIGHT (C3; LEN (C3) -5) ; $ E $ 22: $ F $ 23; 2; 0)

In the above formula I have used LEN (Text) as a function to measure the length of a string. Since the Workplace column to look up the column is not 2 or 3 characters long, the length of the string is subtracted from the length of the first characters. To reduce complexity, you can norm for the same type, for example, instead of HN and HCM, you can convert to HAN and HCM, the formula will only be: 

= VLOOKUP ( RIGHT (C3; 3) ; $ E $ 22: $ F $ 23; 2; 0)

And here is the results table after you've filled the formula and copied data down the lines below:

LEFT / RIGHT function: Formulas, usage in Excel

That's it, do you find these 2 functions simple? Actually these are the two simplest functions in the text function group. In addition, through this article you also know one more simple function is the LEN function. Please follow the next articles on Download.com.vn to learn more about using other basic functions of Excel!

Sign up and earn $1000 a day ⋙

Leave a Comment

8 Things You Didnt Know You Could Do in the Samsung Gallery App

8 Things You Didnt Know You Could Do in the Samsung Gallery App

Samsung's Gallery app is more capable than you might think, but that might not be immediately obvious.

Microsofts foldable smartphone wont have a crease

Microsofts foldable smartphone wont have a crease

Microsoft is said to be getting closer to launching its first foldable smartphone when it was granted a patent for a foldable phone with the ability to fold 360 degrees but without creating wrinkles on the screen on October 1.

Google testing blue checkmark in search

Google testing blue checkmark in search

Google is testing a new verification feature through a blue checkmark in search that will help users avoid clicking on fake or fraudulent website links.

Distinguishing Microsoft 365 and Office 2024

Distinguishing Microsoft 365 and Office 2024

At first glance, Microsoft 365 and Office 2024 may seem very similar, as they both give you access to Microsoft's popular and widely used applications.

Latest Elemental Dungeons Codes and How to Enter Codes

Latest Elemental Dungeons Codes and How to Enter Codes

Elemental Dungeons codes are a necessary form of reward for gamers. Like any other online game on Roblox, players can receive these aids in exchange for money or other items.

How to repeat table title bar in Word

How to repeat table title bar in Word

When you print a Word document, create a table in Word, repeating the title in Word helps us track the title more conveniently, read the document title seamlessly across different pages, especially with long titles.

How to create animated messages on iMessage iOS 18

How to create animated messages on iMessage iOS 18

The new iOS 18 iMessage is updated with animated messages, text effects with many options to use for the messages you send.

Why are pigs the nemesis of snakes?

Why are pigs the nemesis of snakes?

There is an interesting fact about pigs that not everyone knows: pigs are considered the enemy of snakes, because when these two animals meet, most snakes will become food for pigs.

What is the distance from Earth to Jupiter - the largest planet in the Solar System?

What is the distance from Earth to Jupiter - the largest planet in the Solar System?

How far is Jupiter from Earth? If you don't know, this article will tell you how far Jupiter is from Earth.

Discover the out meta generals of season S1 2023 Lien Quan Mobile

Discover the out meta generals of season S1 2023 Lien Quan Mobile

Which champions are out of the Lien Quan Mobile meta? Let's find out now!

Graves DTCL season 7.5: Standard items, Graves Loi Long squad

Graves DTCL season 7.5: Standard items, Graves Loi Long squad

Graves DTCL from season 1, season 3 and season 6 all cost only 1 gold and seem to be just an additional champion to stimulate the clan system, the main role in the early game is still used but not much. Until this DTCL season 7.5, Graves has increased his price to 4 gold and is definitely an indispensable main force if you decide to play Thunder Dragon or Gunner.

How to use separate app sounds on Samsung

How to use separate app sounds on Samsung

With Samsung phones, you should use the separate app audio feature. For example, you can play Apple Music and your phone will route the audio through your car's speakers.

Good quotes about work, good statuses about work inspire you to achieve success

Good quotes about work, good statuses about work inspire you to achieve success

There are many good statuses about work on the Internet. This article will summarize for you good and meaningful statuses about work.

Wedding anniversary captions, meaningful and sweet wedding anniversary statuses

Wedding anniversary captions, meaningful and sweet wedding anniversary statuses

What is a good and meaningful wedding anniversary caption? This article will summarize for you short, concise wedding anniversary captions that can make your spouse remember forever.

List of latest Dai Hiep Phong Van codes and how to redeem codes

List of latest Dai Hiep Phong Van codes and how to redeem codes

Code Dai Hiep Phong Van helps players use attractive rewards even if they have just started wandering the world in the game.