Text to column where to put result

  • Thread starter Going Crazy with excel
  • Start date
G

Going Crazy with excel

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?
 
M

Ms-Exl-Learner

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)))
 
J

John

Hi
Assuming your data is starting at A1, if you select B1, it will be transferred
to column B and C.
If you leave it at A1 then it will be in column A and B.
If you don't like the result, you can undo and start over.
HTH
John
 
G

Going Crazy with excel

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
 
P

Per Jessen

Look at the TextToColumns function again.
In Delemiter section check 'Other' and enter the dash. Follow the
guide, and see what happens.

Regards,
Per

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








"Going Crazy with excel" wrote:

- Vis tekst i anførselstegn -[/QUOTE]
 
G

Going Crazy with excel

Per Jessen, I did try that. Will not separte one name from the other for
whatever reason. Of course, that would be to simple. That's the reason I am
contemplating going back with a formula, just can't find the right one.

Per Jessen said:
Look at the TextToColumns function again.
In Delemiter section check 'Other' and enter the dash. Follow the
guide, and see what happens.

Regards,
Per




- Vis tekst i anførselstegn -

.
[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top