ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If Begins With - Not Working - Please Help (https://www.excelbanter.com/excel-programming/415119-if-begins-not-working-please-help.html)

pt_lily

If Begins With - Not Working - Please Help
 
I have a column, H, that contains various product item numbers. I need the
column next to it to return certain values depending on the first two letters
in the item number in column H. I have tried the fomula below, but it only
returns blanks. My item numbers, for example, would read IN056242. If it
begins with IN, I need it return a Yes.

=IF(LEFT(H2)="IN*","Yes",IF(LEFT(H2)="NS*","No","" ))

Any help with what I am doing wrong would be greatly appreciated.

Don Guillett

If Begins With - Not Working - Please Help
 
try it this way
=IF(LEFT(M5,2)="in","y",IF(LEFT(M5,2)="ns","n","") )

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pt_lily" wrote in message
...
I have a column, H, that contains various product item numbers. I need the
column next to it to return certain values depending on the first two
letters
in the item number in column H. I have tried the fomula below, but it
only
returns blanks. My item numbers, for example, would read IN056242. If it
begins with IN, I need it return a Yes.

=IF(LEFT(H2)="IN*","Yes",IF(LEFT(H2)="NS*","No","" ))

Any help with what I am doing wrong would be greatly appreciated.



Ron Rosenfeld

If Begins With - Not Working - Please Help
 
On Mon, 4 Aug 2008 12:00:07 -0700, pt_lily
wrote:

I have a column, H, that contains various product item numbers. I need the
column next to it to return certain values depending on the first two letters
in the item number in column H. I have tried the fomula below, but it only
returns blanks. My item numbers, for example, would read IN056242. If it
begins with IN, I need it return a Yes.

=IF(LEFT(H2)="IN*","Yes",IF(LEFT(H2)="NS*","No"," "))

Any help with what I am doing wrong would be greatly appreciated.



=IF(LEFT(H2,2)="IN","Yes",IF(LEFT(H2,2)="NS","No", ""))
--ron

pt_lily

If Begins With - Not Working - Please Help
 
Thank you so much! This works perfectly.

"Ron Rosenfeld" wrote:

On Mon, 4 Aug 2008 12:00:07 -0700, pt_lily
wrote:

I have a column, H, that contains various product item numbers. I need the
column next to it to return certain values depending on the first two letters
in the item number in column H. I have tried the fomula below, but it only
returns blanks. My item numbers, for example, would read IN056242. If it
begins with IN, I need it return a Yes.

=IF(LEFT(H2)="IN*","Yes",IF(LEFT(H2)="NS*","No"," "))

Any help with what I am doing wrong would be greatly appreciated.



=IF(LEFT(H2,2)="IN","Yes",IF(LEFT(H2,2)="NS","No", ""))
--ron


Ron Rosenfeld

If Begins With - Not Working - Please Help
 
On Mon, 4 Aug 2008 12:34:11 -0700, pt_lily
wrote:

Thank you so much! This works perfectly.

"Ron Rosenfeld" wrote:

On Mon, 4 Aug 2008 12:00:07 -0700, pt_lily
wrote:

I have a column, H, that contains various product item numbers. I need the
column next to it to return certain values depending on the first two letters
in the item number in column H. I have tried the fomula below, but it only
returns blanks. My item numbers, for example, would read IN056242. If it
begins with IN, I need it return a Yes.

=IF(LEFT(H2)="IN*","Yes",IF(LEFT(H2)="NS*","No"," "))

Any help with what I am doing wrong would be greatly appreciated.



=IF(LEFT(H2,2)="IN","Yes",IF(LEFT(H2,2)="NS","No", ""))
--ron



Glad to help. Thanks for the feedback.

--ron


All times are GMT +1. The time now is 12:45 PM.

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