ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Extra string before a specific character (https://www.excelbanter.com/excel-worksheet-functions/220309-extra-string-before-specific-character.html)

Sandra

Extra string before a specific character
 
I have a column of data, like CA-, THAMES-, AWR-. etc. I want to pull all
data before the "-". It could be 2 characters to 6. Any ideas? Thanks.

Pete_UK

Extra string before a specific character
 
Try this:

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

assuming your test is in A1, then copy down as required.

Hope this helps.

Pete

On Feb 11, 1:39*pm, Sandra wrote:
I have a column of data, like CA-, THAMES-, AWR-. etc. *I want to pull all
data before the "-". *It could be 2 characters to 6. *Any ideas? *Thanks.




All times are GMT +1. The time now is 04:50 AM.

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