Home » » Using Left Function for a variable lenght of string to trim

Using Left Function for a variable lenght of string to trim


Here, we will see how we can get dynamic output with a simple function.

For example, assume that you have an Excel sheet having some 2000 web domain names ending with forward slash "\" 

How will you remove that forward slash "\" from the list?
Using LEFT command, we can get the result.


Syntax
=LEFT(text,[num_chars])

text = > Select the cell data
num_chars  = > Number of characters you want to fetch

=LEFT(A2,24)
24 = Number of characters in the cell.

In =LEFT(A2,24) number 24 has to change based on cell length


By using another simple formula, LEN, you can find the number of characters in the cell.

Syntax=LEN(text) = It will tell us number of characters in a cell

Now, using both LEFT and LEN, we can get dynamic results.






0 comments:

Post a Comment

Like us on Facebook
Follow us on Twitter
Recommend us on Google Plus