Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a string that contains math problems with numbers and operators. I
need to assign the solution to a variable. See examples below. My first thought was to use split with "+" as my delimiter. Worked great! Problem is that the string can have any combination of +, -, *, and / operators or no operators at all. Anyone have a suggestion? Examples: String ; Result "15" ; 15 "10+5" ; 15 "20-5" ; 15 "10+7-2" ; 15 "30/3+5" ; 15 "-5+20" ; 15 Notice the minus sign in the last example. If a minus sign is the first character then the first number is negative. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Help - Split capital letters from first part of string | Excel Discussion (Misc queries) | |||
Split text string using mid-search? | Excel Discussion (Misc queries) | |||
extract text from string, leaving numbers and operators | Excel Discussion (Misc queries) | |||
split string based on a SET of words | Excel Discussion (Misc queries) | |||
Excel 2000 VBA - Using Split() with no Lelimiter in string | Excel Programming |