Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Parse cell value based on contents

In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Parse cell value based on contents

Try this:

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"Craig860" wrote in message
...
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Parse cell value based on contents

Ooops!

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND ("(",A1)+1,100),")",""))


You wanted the cell left blank...

=IF(ISERR(FIND("(",A1)),"",SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"Craig860" wrote in message
...
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default Parse cell value based on contents

Look at this example:

=if(iserror(YourFormula),"",YourFormula))

Regards,
Per

On 24 Sep., 04:42, Craig860
wrote:
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.


  #5   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Parse cell value based on contents

Another suggestion - which I got from one of your previous posts:

=SUBSTITUTE(MID(A1,FIND("(",A1&"(")+1,255),"(","")


"T. Valko" wrote:

Ooops!

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND ("(",A1)+1,100),")",""))


You wanted the cell left blank...

=IF(ISERR(FIND("(",A1)),"",SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"Craig860" wrote in message
...
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Parse cell value based on contents

Nice one! <g

Just turn around that last instance of "("

--
Biff
Microsoft Excel MVP


"JMB" wrote in message
...
Another suggestion - which I got from one of your previous posts:

=SUBSTITUTE(MID(A1,FIND("(",A1&"(")+1,255),"(","")


"T. Valko" wrote:

Ooops!

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND ("(",A1)+1,100),")",""))


You wanted the cell left blank...

=IF(ISERR(FIND("(",A1)),"",SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"Craig860" wrote in message
...
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank,
how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I
get
#VALUE! which makes the spreadsheet look sloppy.







  #7   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Parse cell value based on contents

Give yourself a pat on the back - you earned it! I must have copied the
formula to the clipboard before I fixed that parentheses thingy:

=SUBSTITUTE(MID(A1,FIND("(",A1&"(")+1,255),")","")


"T. Valko" wrote:

Nice one! <g

Just turn around that last instance of "("

--
Biff
Microsoft Excel MVP


"JMB" wrote in message
...
Another suggestion - which I got from one of your previous posts:

=SUBSTITUTE(MID(A1,FIND("(",A1&"(")+1,255),"(","")


"T. Valko" wrote:

Ooops!

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND ("(",A1)+1,100),")",""))

You wanted the cell left blank...

=IF(ISERR(FIND("(",A1)),"",SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(ISERR(FIND("(",A1)),A1,SUBSTITUTE(MID(A1,FIND( "(",A1)+1,100),")",""))


--
Biff
Microsoft Excel MVP


"Craig860" wrote in message
...
In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank,
how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I
get
#VALUE! which makes the spreadsheet look sloppy.








  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Parse cell value based on contents

Thank you gentlemen! I don't think I would have ever come up with that.

"Craig860" wrote:

In follow up to my previous question,
if
A1=Joe(abc)
a2=Sam(bdc)
a3=Sarah

to get the contents of the paranthesis in b1,b2 however b3 be blank, how
would would the formula go so I can avoid #VALUE! in b3.
ie:
b1=abc
b2=bdc
b3=
=MID(G2,FIND("(",G2)+1,(FIND(")",G2)-FIND("(",G2)-1)) will give me the
parenthisi value in it's own cell. But if there is no parenthisis, I get
#VALUE! which makes the spreadsheet look sloppy.

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
Formatting one cell based on the contents of another [email protected] Excel Discussion (Misc queries) 4 April 13th 07 06:15 PM
Can I format a row based on the contents of one cell? Kirsty Excel Discussion (Misc queries) 1 May 23rd 06 02:57 PM
Parse cell contents ? Fullam Excel Discussion (Misc queries) 4 May 3rd 06 06:14 PM
Parse contents of cell Portuga Excel Discussion (Misc queries) 4 March 28th 06 03:44 PM
Add Rows based on Cell contents Doug Manning Excel Discussion (Misc queries) 0 September 16th 05 07:01 PM


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