Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default HELP WITH FORMULA

Hi

I have data on Column a1 as:

A1

1HOTEL
0PURCHASER TOWN/
POST OFFICE
COMMUNITY
0

Data format is general

I want to remove 1,0 i am using this formaula but it does
not work for POST OFFICE & COMMUNITY

=IF(OR(MID(A1,1,1)=1,MID(A1,1,1)=0,MID(A1,1,1)="") ,A1,MID
(31,2,60))

can any one Help on this one please

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default HELP WITH FORMULA

Have you looked at using Edit=Replace

Are the numbers 1 and 0 found in other locations in the text string?

--
Regards,
Tom Ogilvy

"SUZZI" wrote in message
...
Hi

I have data on Column a1 as:

A1

1HOTEL
0PURCHASER TOWN/
POST OFFICE
COMMUNITY
0

Data format is general

I want to remove 1,0 i am using this formaula but it does
not work for POST OFFICE & COMMUNITY

=IF(OR(MID(A1,1,1)=1,MID(A1,1,1)=0,MID(A1,1,1)="") ,A1,MID
(31,2,60))

can any one Help on this one please

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default HELP WITH FORMULA

If Tom's suggest is no good... It seems your formula is doing the opposite
of what you say you want. Anyway maybe:

=IF(OR(LEFT(A1,1)="1",LEFT(A1,1)="0"),MID(A1,2,100 ),A1)

--
Jim Rech
Excel MVP


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default HELP WITH FORMULA

Thanks for reply

0/1 dont repeat else where in the string


-----Original Message-----
Have you looked at using Edit=Replace

Are the numbers 1 and 0 found in other locations in the

text string?

--
Regards,
Tom Ogilvy

"SUZZI" wrote in

message
...
Hi

I have data on Column a1 as:

A1

1HOTEL
0PURCHASER TOWN/
POST OFFICE
COMMUNITY
0

Data format is general

I want to remove 1,0 i am using this formaula but it

does
not work for POST OFFICE & COMMUNITY

=IF(OR(MID(A1,1,1)=1,MID(A1,1,1)=0,MID(A1,1,1)

=""),A1,MID
(31,2,60))

can any one Help on this one please

Thanks




.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default HELP WITH FORMULA

Thanks for reply

Your formula helped thanks once again

-----Original Message-----
If Tom's suggest is no good... It seems your formula is

doing the opposite
of what you say you want. Anyway maybe:

=IF(OR(LEFT(A1,1)="1",LEFT(A1,1)="0"),MID(A1,2,10 0),A1)

--
Jim Rech
Excel MVP


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default HELP WITH FORMULA

Thanks for reply

Your formula helped thanks once again

-----Original Message-----
If Tom's suggest is no good... It seems your formula is

doing the opposite
of what you say you want. Anyway maybe:

=IF(OR(LEFT(A1,1)="1",LEFT(A1,1)="0"),MID(A1,2,10 0),A1)

--
Jim Rech
Excel MVP


.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default HELP WITH FORMULA

On Wed, 10 Dec 2003 05:17:11 -0800, "SUZZI"
wrote:

Hi

I have data on Column a1 as:

A1

1HOTEL
0PURCHASER TOWN/
POST OFFICE
COMMUNITY
0

Data format is general

I want to remove 1,0 i am using this formaula but it does
not work for POST OFFICE & COMMUNITY

=IF(OR(MID(A1,1,1)=1,MID(A1,1,1)=0,MID(A1,1,1)="" ),A1,MID
(31,2,60))

can any one Help on this one please

Just another solution:

=RIGHT(L1,MIN(LEN(SUBSTITUTE(LEFT(L1,1),{"0","1"}, "")&RIGHT(L1,LEN(L1)-1))))

Note that {"0","1"} is an array constant. And you could add any other leading
character to this array.


--ron
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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 12:28 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"