ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   What formula do I use to copy only text on left side of a comma? (https://www.excelbanter.com/excel-worksheet-functions/226770-what-formula-do-i-use-copy-only-text-left-side-comma.html)

Danielsjt

What formula do I use to copy only text on left side of a comma?
 
I have a spreadsheet and in column D contains Equipment #'s and their
description separated by a comma. How can I separate the Equipment #'s into
Column G.
Sheet contains approx. 1500 rows.

Example:
T-8900-F, Fresh Water storage Tank


FSt1

What formula do I use to copy only text on left side of a comma?
 
hi
from what you describe, i would suggest text to columns
2003 menubardatatext to columndelimited, commafinish
2007 data tabtool grouptext to columnsdelimited, commafinish

make a back up prior to runing the text to column wizard.

regards
FSt1

"Danielsjt" wrote:

I have a spreadsheet and in column D contains Equipment #'s and their
description separated by a comma. How can I separate the Equipment #'s into
Column G.
Sheet contains approx. 1500 rows.

Example:
T-8900-F, Fresh Water storage Tank


Dave Peterson

What formula do I use to copy only text on left side of a comma?
 
If there's exactly one comma in each of those cells, you can use this technique:

Insert a new column E
Select the range in column D
Data|text to columns (in xl2003 menus)
delimited
by comma
and you'll be done

But don't use this if your data can have multiple commas in any of the cells.
You'll end up with more than 2 columns of data if you do.



Danielsjt wrote:

I have a spreadsheet and in column D contains Equipment #'s and their
description separated by a comma. How can I separate the Equipment #'s into
Column G.
Sheet contains approx. 1500 rows.

Example:
T-8900-F, Fresh Water storage Tank


--

Dave Peterson

Dave Peterson

What formula do I use to copy only text on left side of a comma?
 
ps. If you really want to have the stuff on the left side of the comma, you can
use:

=trim(left(d1,search(",",d1&",")-1))


Danielsjt wrote:

I have a spreadsheet and in column D contains Equipment #'s and their
description separated by a comma. How can I separate the Equipment #'s into
Column G.
Sheet contains approx. 1500 rows.

Example:
T-8900-F, Fresh Water storage Tank


--

Dave Peterson

JLatham

What formula do I use to copy only text on left side of a comma?
 
If it is just the right side of the comma you want, then try
=TRIM(RIGHT(D2,LEN(D2)-FIND(",",D2)))
As Dave said, this works based on the position of the 1st comma and he's
given you the formula for the left half if that's what you want.

"Danielsjt" wrote:

I have a spreadsheet and in column D contains Equipment #'s and their
description separated by a comma. How can I separate the Equipment #'s into
Column G.
Sheet contains approx. 1500 rows.

Example:
T-8900-F, Fresh Water storage Tank



All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com