![]() |
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? |
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? |
=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? |
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? |
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? |
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