Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delimit using a formula | Excel Discussion (Misc queries) | |||
Imported Data, How to delimit correctly | New Users to Excel |