Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have 1 string which contains the value like "25-32". I want to spli it in 2 strings such that the value of string1="25" string2="32" Please help me out, Regards. Ashis -- ashishpre ----------------------------------------------------------------------- ashishprem's Profile: http://www.excelforum.com/member.php...fo&userid=3148 View this thread: http://www.excelforum.com/showthread.php?threadid=51221 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As this is in programming, I guess that you want vba.
ary = Split("25-32", "-") string1 = ary(0) string2 = ary(1) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "ashishprem" wrote in message ... I have 1 string which contains the value like "25-32". I want to split it in 2 strings such that the value of string1="25" string2="32" Please help me out, Regards. Ashish -- ashishprem ------------------------------------------------------------------------ ashishprem's Profile: http://www.excelforum.com/member.php...o&userid=31485 View this thread: http://www.excelforum.com/showthread...hreadid=512210 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is called parsing, with a delimiter of "-".
Assuming the numbers can be bigger or smaller, use code similar to: txt = "25-32" delim="-" loc = instr(txt,delim) string1 = mid(txt,1,loc-1) string2 = mid(txt,loc+1) "ashishprem" wrote: I have 1 string which contains the value like "25-32". I want to split it in 2 strings such that the value of string1="25" string2="32" Please help me out, Regards. Ashish -- ashishprem ------------------------------------------------------------------------ ashishprem's Profile: http://www.excelforum.com/member.php...o&userid=31485 View this thread: http://www.excelforum.com/showthread...hreadid=512210 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Splitting a file with lookup functions into smaller parts | Excel Worksheet Functions | |||
Splitting a text string into string and number | Excel Discussion (Misc queries) | |||
Splitting String into Consitiutent Parts including spaces characte | Excel Programming | |||
Extract certain parts of string | Excel Worksheet Functions | |||
Extract certain parts of string | Excel Worksheet Functions |