ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   check if the text string start with a specific character (https://www.excelbanter.com/new-users-excel/46613-check-if-text-string-start-specific-character.html)

September21

check if the text string start with a specific character
 
Hi,
I want to know how do I check if the text string starts with a specific
character in if statement.

I used ...
=IF(ISNUMBER(FIND("v",'A2)),"OK","Not OK")

But, the result for this argument returns the text string which includes "v"
anywhere in the text string.
I just want to the text string which begins with "v".

How can I make it?


Max

Try: =IF(LEFT(TRIM(A2),1)="v","OK","Not OK")

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"September21" wrote in message
...
Hi,
I want to know how do I check if the text string starts with a specific
character in if statement.

I used ...
=IF(ISNUMBER(FIND("v",'A2)),"OK","Not OK")

But, the result for this argument returns the text string which includes

"v"
anywhere in the text string.
I just want to the text string which begins with "v".

How can I make it?




CLR

=IF(LEFT(A2,1)="v","OK","Not OK")

Vaya con Dios,
Chuck, CABGx3


"September21" wrote in message
...
Hi,
I want to know how do I check if the text string starts with a specific
character in if statement.

I used ...
=IF(ISNUMBER(FIND("v",'A2)),"OK","Not OK")

But, the result for this argument returns the text string which includes

"v"
anywhere in the text string.
I just want to the text string which begins with "v".

How can I make it?




September21

Thank you very much for your help!


"Max" wrote:

Try: =IF(LEFT(TRIM(A2),1)="v","OK","Not OK")

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"September21" wrote in message
...
Hi,
I want to know how do I check if the text string starts with a specific
character in if statement.

I used ...
=IF(ISNUMBER(FIND("v",'A2)),"OK","Not OK")

But, the result for this argument returns the text string which includes

"v"
anywhere in the text string.
I just want to the text string which begins with "v".

How can I make it?





September21

Thank you very much for your help!

"CLR" wrote:

=IF(LEFT(A2,1)="v","OK","Not OK")

Vaya con Dios,
Chuck, CABGx3


"September21" wrote in message
...
Hi,
I want to know how do I check if the text string starts with a specific
character in if statement.

I used ...
=IF(ISNUMBER(FIND("v",'A2)),"OK","Not OK")

But, the result for this argument returns the text string which includes

"v"
anywhere in the text string.
I just want to the text string which begins with "v".

How can I make it?





Max

You're welcome !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"September21" wrote in message
...
Thank you very much for your help!





All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com