comma delimited formula

steve_stiller

New Member
Joined
Sep 1, 2006
Messages
28
Hi,

Does anyone know if there is a formula built into excel that can take one cell and split it in half when a comma occurs.

a1="bob, smith"
a2="bob"
a3="smith"

And if one doesn't exist what would a good macro be to do this?

Thanks alot,

Steve
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Data - Text to Columns.
Select Deliminated - next
Check "Comma" - Finish


or if it must be formula,

A2 =LEFT(A1,FIND(",",A1)-1)
A3 =TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))
 
Upvote 0
highlight the column you need to do this to
select the data menu
select text to columns
choose delimited
Finish
 
Upvote 0
Steve

There are both formulas and code that will do that.

But how about Data>Text to columns... using comma as a delimiter?
 
Upvote 0
Worked for me :) Re: comma delimited formula

Hi Guys Thanks for a easier way for my line of work i made a batch File that copies my files from a Temporary location.

so i had "Templates" Ready

these get copied to my new location via the batch file.

I receive Files containing " | / Pipe"

in Column "A" i have
=LEFT(C1,FIND("|",C1)-1)

in Column "B" i have :
=TRIM(RIGHT(C1,LEN(C1)-FIND("|",C1)))

Pasting My message In Column "C"
277888|this is my message and i am different for every line

save the file

So the system i use i can select Ignore column "C"

Super Thanks Guys
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,492
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top