Locating the First Comma in a Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What I am trying to do is find a formula, that will locate the first comma in
a text string, and then the next, until there is no more. Becasue I have
some text information, that is seprated by commas, and I now need to put this
information in different cells. BTW this information has been download from
the interent, so somebody is just not keying this stuff in.
 
Yes I know about that and it works, but it is time consuming, when I have
more then one line to do. If I had formula, then it would happen
automaticlly for me.
 
Guess I will have to see if I can find another source for the information
that I'm seeking. So far it is not forth coming here.
 
Text to Columns is the best solution.........

Using formulas can be somewhat complicated depending on how many commas may
be present. Does every entry have the same number of commas? Post several
representative samples.

Biff
 
The answer to your question is yes it does.

Example:
J. Brown, J. Simpson
O. Holmes, T. Johns
S. Oliver, K. Martin
 
Ok, that's relatively easy:
J. Brown, J. Simpson
O. Holmes, T. Johns
S. Oliver, K. Martin

Assume that data is in A1:A3

Enter this formula in B1:

=LEFT(A1,FIND(",",A1&",")-1)

Enter this formula in C1:

=IF(B1=A1,"",SUBSTITUTE(A1,B1&", ",""))

Select both B1 and C1 then copy down as needed.

Biff
 
Ok, that's relatively easy:
J. Brown, J. Simpson
O. Holmes, T. Johns
S. Oliver, K. Martin

Assume that data is in A1:A3

Enter this formula in B1:

=LEFT(A1,FIND(",",A1&",")-1)

Enter this formula in C1:

=IF(B1=A1,"",SUBSTITUTE(A1,B1&", ",""))

Select both B1 and C1 then copy down as needed.

Biff
 
Assuming your data in A1:A3

B1 =LEFT(A1,FIND(",",A1)-1)
C1 =RIGHT(A1,LEN(A1)-(FIND(",",A1)+1))
Select B1 & C1 and drag down to C3
 
Thanks to both of you for helping me on this problem. It works just perfect.
And my you both have a Merry Christmas.

Steve
 
Folks you don't how valuable that formula was to me. It as answer and solved
several forumla problems that I was having, in other aspect in my worksheet.
I have tried on several different worksheets, and it has worked everytime.

Thanks again so much.

Steve
 
You're welcome!

Biff

caldog said:
Folks you don't how valuable that formula was to me. It as answer and
solved
several forumla problems that I was having, in other aspect in my
worksheet.
I have tried on several different worksheets, and it has worked everytime.

Thanks again so much.

Steve
 

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

Back
Top