The LEFT function was used in the dataset below to extract the area codes from a list of phone numbers.
The area codes are displayed between brackets:
Method 1 – Use the Ampersand (&) Symbol in the Excel Formula
- Enter the following formula in C5.
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
="(" & LEFT(B5,3) & ")"
- You can also use the CHAR function: change the formula to the following one:
=CHAR(40) & LEFT(B5,3) & CHAR(41)
Method 2 – Combine the CONCAT Function with the Current Formula
- Change the formula in C5 to:
=CONCAT("(",LEFT(B5,3),")")
Method 3 – Use the CONCATENATE Function
- Replace the formula in C5 with:
=CONCATENATE("(",LEFT(B5,3),")")
Method 4 – Add Characters using an Excel Formula with the TEXTJOIN Function
- Use the following formula in C5.
=TEXTJOIN("",TRUE,"(",LEFT(B5,3),")")
Things to Remember
- Enclose the characters in double quotes to add them to the formula.
Download Practice Workbook
Download the practice workbook.
<< Go Back to Learn Excel
Get FREE Advanced Excel Exercises with Solutions!