Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Delimit using a formula 2

I am using the functions

=MID(A1,FIND("(",A1)+1,FIND("/",A1)-FIND("(",A1)-1) and
=MID(A1,FIND("/",A1)+1,FIND(")",A1)-FIND("/",A1)-1)

to get a couple of numbers out of a cell which use the delimiters (, /, and )
e.g. text (2/3) more text

I am using this to pull out odds from a betting site, however if the odds
are displayed as just a whole number e.g. (2) this is not working

Is there a way to put an if function in or something to say "if the cell
contains an "/" character do the original formula, if not do a slightly
altered formula only containing "(" and ")".

Please see my post "Delimit using a formula" for further details, any help
would be greatly appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Delimit using a formula 2

This way:
=if(isnumber(find("/",a1)),"has slash","no slash")

Regards,
Fred

"laandmc" wrote in message
...
I am using the functions

=MID(A1,FIND("(",A1)+1,FIND("/",A1)-FIND("(",A1)-1) and
=MID(A1,FIND("/",A1)+1,FIND(")",A1)-FIND("/",A1)-1)

to get a couple of numbers out of a cell which use the delimiters (, /,
and )
e.g. text (2/3) more text

I am using this to pull out odds from a betting site, however if the odds
are displayed as just a whole number e.g. (2) this is not working

Is there a way to put an if function in or something to say "if the cell
contains an "/" character do the original formula, if not do a slightly
altered formula only containing "(" and ")".

Please see my post "Delimit using a formula" for further details, any help
would be greatly appreciated.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Delimit using a formula 2

Sure. Assuming you want the singular answer in the first formula and the
second formula to not even run:
=IF(FIND("/",A1),MID(A1,FIND("(",A1)+1,FIND("/",A1)-FIND("(",A1)-1),MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1))
and
=IF(FIND("/",A1),MID(A1,FIND("/",A1)+1,FIND(")",A1)-FIND("/",A1)-1),"")
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"laandmc" wrote:

I am using the functions

=MID(A1,FIND("(",A1)+1,FIND("/",A1)-FIND("(",A1)-1) and
=MID(A1,FIND("/",A1)+1,FIND(")",A1)-FIND("/",A1)-1)

to get a couple of numbers out of a cell which use the delimiters (, /, and )
e.g. text (2/3) more text

I am using this to pull out odds from a betting site, however if the odds
are displayed as just a whole number e.g. (2) this is not working

Is there a way to put an if function in or something to say "if the cell
contains an "/" character do the original formula, if not do a slightly
altered formula only containing "(" and ")".

Please see my post "Delimit using a formula" for further details, any help
would be greatly appreciated.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Delimit using a formula 2

I have built some text functions into my Excel functions library litLIB that may be handy: SplitText, TextBetween.

Gerrit-Jan Linker
Author of LITLIB

---
frmsrcurl: http://msgroups.net/microsoft.public...ng-a-formula-2
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
delimit using a formula laandmc Excel Discussion (Misc queries) 2 March 4th 10 09:26 PM
Imported Data, How to delimit correctly GKS New Users to Excel 1 March 25th 06 06:32 PM


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

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"