View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default split 1.5/2.1 into 1.5 and 2.1

'VBA
strData = "1.5/2.1"
Range("B1") = Split(strData,"/")(0)
Range("C1") = Split(strData,"/")(1)


Or, since we are going across columns, more simply...

strData = "1.5/2.1"
Range("B1:C1") = Split(strData, "/")

Note to the OP... Jacob (and I) used a String variable (strData) to hold
your values, but this value can come directly from a cell as well... just
replace strData with Range("A1") assuming your cell is A1, of course.

--
Rick (MVP - Excel)