#1   Report Post  
AJPendragon
 
Posts: n/a
Default LEFT function

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

  #2   Report Post  
Biff
 
Posts: n/a
Default

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

-----Original Message-----
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

.

  #3   Report Post  
Max
 
Posts: n/a
Default

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
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"AJPendragon" wrote in message
...
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



  #4   Report Post  
Roger Govier
 
Posts: n/a
Default

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)

--
Regards
Roger Govier
"AJPendragon" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
The left function does not work when displaying times, how is thi. Nambo27 Excel Worksheet Functions 3 February 25th 05 06:46 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
left worksheet function within a combo box Billing Goddess Excel Worksheet Functions 3 November 15th 04 08:58 PM


All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"