View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Going Crazy with excel[_2_] Going Crazy with excel[_2_] is offline
external usenet poster
 
Posts: 16
Default Text to column where to put result

I think you are on the right track MS-Exl-Learner, but it didn't work.
Got a "value" error.
Originally tried the text to column tab, but that would not recognize the
"dash" -, instead of the space. Yup that would be too easy.
Guess the formula, is the only way to go. Just need to tweek it. Any ideas?
Again, my cell looks like this:
ralph-cramdon


"Ms-Exl-Learner" wrote:

Assume that your data is in a1 cell like the below.

A1 cell
name-name2

Copy and paste the below formula in B1 cell
=IF(A1="","",TRIM(LEFT(A1,FIND("-",A1)-1)))

Copy and paste the below formula in C1 cell
=IF(A1="","",TRIM(MID(A1,FIND("-",A1)+1,255)))
--
Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Going Crazy with excel" wrote:

I am using text to column.
Have name-name2
They are separated by a "dash". Want them in two separate columns.
What do I put in the destination cell?