Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Extract Number without quotation marks

Hi,

I've the following questions : -

A)Is there anyway to remove "( )", "[ ]" or "{ }" from the numbering
in a cell ?, ie the result is only an alphanumeric and will be
I0307981PS,I04L04513,I0220105S for the following examples.

It seems that SUBSTITUTE function fails to solve this question, ie
=SUBSTITUTE(A2,"()","")

E.g.

1) I03-07981(P-S)
2) I04-[L]04513
3) I02-201{05}S

B) How to extract a numbering, only an alphanumeric as I030214PPG
without the quotation marks from I-03-02 14*(P-PG) ? Can SUBSTITUTE
function solve this
question as well ?

Please helps

Thanks
Regards
Lenard
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Extract Number without quotation marks

Grüezi ltong

ltong schrieb am 30.09.2004

A)Is there anyway to remove "( )", "[ ]" or "{ }" from the numbering
in a cell ?, ie the result is only an alphanumeric and will be
I0307981PS,I04L04513,I0220105S for the following examples.

It seems that SUBSTITUTE function fails to solve this question, ie
=SUBSTITUTE(A2,"()","")

E.g.

1) I03-07981(P-S)
2) I04-[L]04513
3) I02-201{05}S


Try the following formula (its a bit scary ;-)):

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE(SUBSTITUTE(A1,"-",""),"(",""),")",""),"[",""),"]",""),"{",""),"}","")

B) How to extract a numbering, only an alphanumeric as I030214PPG
without the quotation marks from I-03-02 14*(P-PG) ? Can SUBSTITUTE
function solve this
question as well ?


Maybe you could use a userdifined function like the following:

Public Function SubstCustom(rngCell As Range, ParamArray characters())
Dim substChar As Variant
SubstCustom = rngCell
For Each substChar In characters()
SubstCustom = Application.WorksheetFunction.Substitute(SubstCust om, _
substChar, "")
Next substChar
End Function

In the worksheet you can do what the before mentioned formula does like
this:

=SubstCustom(A1,"-","(",")","[","]","{","}")

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Extract Number without quotation marks

Hi Thomas,

Thanks, it works great.....

Regards
Lenard


Thomas Ramel wrote in message ...
Grüezi ltong

ltong schrieb am 30.09.2004

A)Is there anyway to remove "( )", "[ ]" or "{ }" from the numbering
in a cell ?, ie the result is only an alphanumeric and will be
I0307981PS,I04L04513,I0220105S for the following examples.

It seems that SUBSTITUTE function fails to solve this question, ie
=SUBSTITUTE(A2,"()","")

E.g.

1) I03-07981(P-S)
2) I04-[L]04513
3) I02-201{05}S


Try the following formula (its a bit scary ;-)):

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE(SUBSTITUTE(A1,"-",""),"(",""),")",""),"[",""),"]",""),"{",""),"}","")

B) How to extract a numbering, only an alphanumeric as I030214PPG
without the quotation marks from I-03-02 14*(P-PG) ? Can SUBSTITUTE
function solve this
question as well ?


Maybe you could use a userdifined function like the following:

Public Function SubstCustom(rngCell As Range, ParamArray characters())
Dim substChar As Variant
SubstCustom = rngCell
For Each substChar In characters()
SubstCustom = Application.WorksheetFunction.Substitute(SubstCust om, _
substChar, "")
Next substChar
End Function

In the worksheet you can do what the before mentioned formula does like
this:

=SubstCustom(A1,"-","(",")","[","]","{","}")

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Extract Number without quotation marks

One way:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE(A1,"(",""
),")",""),"[",""),"]",""),"{",""),"}","")

Regards

Trevor


"ltong" wrote in message
om...
Hi,

I've the following questions : -

A)Is there anyway to remove "( )", "[ ]" or "{ }" from the numbering
in a cell ?, ie the result is only an alphanumeric and will be
I0307981PS,I04L04513,I0220105S for the following examples.

It seems that SUBSTITUTE function fails to solve this question, ie
=SUBSTITUTE(A2,"()","")

E.g.

1) I03-07981(P-S)
2) I04-[L]04513
3) I02-201{05}S

B) How to extract a numbering, only an alphanumeric as I030214PPG
without the quotation marks from I-03-02 14*(P-PG) ? Can SUBSTITUTE
function solve this
question as well ?

Please helps

Thanks
Regards
Lenard



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
Quotation Marks 9pluck9 Excel Discussion (Misc queries) 2 May 2nd 07 04:40 PM
Quotation Marks? LinearChaos Excel Worksheet Functions 2 June 25th 06 10:31 PM
without quotation marks? jfazz Excel Discussion (Misc queries) 1 March 2nd 06 04:43 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
Using quotation marks Mike Collard Excel Programming 4 July 20th 04 08:09 PM


All times are GMT +1. The time now is 06:56 PM.

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

About Us

"It's about Microsoft Excel"