LEFT function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list of extension numbers - some begin with 1 - I wish to have a
column that shows "Ignore" against the numbers beginning with 1.

I thought the following formula would work:

=IF(LEFT(A1,1)=1,"Ignore",A1)

It looks like excel does not recognise the result from LEFT(A1,1)as 1 ?

Thanks

Andrew
 
Hi!

Try either one of these:

=IF(--LEFT(A1,1)=1,"Ignore",A1)

=IF(LEFT(A1,1)="1","Ignore",A1)

LEFT is a TEXT function. Everything it returns is TEXT.

Biff
 
Try instead: =IF(LEFT(A1,1)+0=1,"Ignore",A1)

"+0" is one way to coerce the
result from LEFT(A1,1) to a "real" number
 
Probably because the 1 is text. Wrap the test 1 in quotes "1"
=IF(LEFT(A1,1)="1","Ignore",A1)
or force it to be numeric with the double unary in front of the formula
=IF(--LEFT(A1,1)=1,"Ignore",A1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top