- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How To Check If Cell Begins Or Ends With A Specific Character In Excel?
When we have a list of entries in excel file and need to identify if there are some entities starting with a specific letter of special character, then looking at each value and counting will be a tedious task to do. This article will help you to find those entities using a formula without looking at each value of the list.
Searching Cells containing Specific Character using Formula
Searching the cells starting with a specific character
Let’s take an example of the following data −
Now, if you want to check the cells begin with the character “$” then follow the below steps −
Step 1 − Create a column where you want to the output to be displayed against each cell.
Step 2 − Enter the following formula by selecting the required cell whose value to be scanned and press enter.
=IF(LEFT(TRIM(B2),1)="$","True”, “False")
Step 3 − Now drag the cell to copy the formula in other cells also to view the output against all cells.
Formula Syntax Description
Argument | Description |
---|---|
IF(logical_test, {value_if_true},{value_if_false} |
|
LEFT(text, [num_chars]) |
|
TRIM( |
|
Searching the cells ending with a specific character
Now, if you want to check the cells ends with the character “n” then follow the below steps −
Step 1 − Create a column where you want to the output to be displayed against each cell.
Step 2 − Enter the following formula by selecting the required cell whose value to be scanned and press enter.
=IF(RIGHT(TRIM(B2),1)="n","True”, “False")
Step 3 − Now drag the cell to copy the formula in other cells also to view the output against all cells.
Formula Syntax Description
Argument | Description |
---|---|
RIGHT(text, [num_chars]) |
|
Searching the cells starting and ending with a specific character
Now, if you want to check the cells starting and ending with the character “s” and “n” respectively,then follow the below steps −
Step 1 − Create a column where you want to the output to be displayed against each cell.
Step 2 − Enter the following formula by selecting the required cell whose value to be scanned and press enter.
=IF(AND(LEFT(TRIM(B3),1)="s",RIGHT(TRIM(B3),1)="n"),TRUE,FALSE)
Step 3 − Now drag the cell to copy the formula in other cells also to view the output against all cells.
Formula Syntax Description
Argument | Description |
---|---|
AND |
|
Conclusion
Hence, using the above-mentioned formulas any number of data can be verified for specific values. These formulas will reduce the processing time of a dataset and enhance the user experience and data visualization. Keep learning, keep exploring Excel.