ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I copy characters from a cell that follow a hypen (https://www.excelbanter.com/excel-discussion-misc-queries/137697-how-can-i-copy-characters-cell-follow-hypen.html)

brantty

How can I copy characters from a cell that follow a hypen
 
I have a cell that has data followed by a hyphen then more data.
EX 12345-ABC456123-more data

I want to copy the first three characters that follow the hyphen so my cell
looks like:

EX ABC

What formula will look to the original cell and remove all the info but keep
the three characters I need?

Elkar

How can I copy characters from a cell that follow a hypen
 
Try this:

=MID(A1,FIND("-",A1)+1,3)

HTH,
Elkar


"brantty" wrote:

I have a cell that has data followed by a hyphen then more data.
EX 12345-ABC456123-more data

I want to copy the first three characters that follow the hyphen so my cell
looks like:

EX ABC

What formula will look to the original cell and remove all the info but keep
the three characters I need?


brantty

How can I copy characters from a cell that follow a hypen
 
That worked great. Thanks

"Elkar" wrote:

Try this:

=MID(A1,FIND("-",A1)+1,3)

HTH,
Elkar


"brantty" wrote:

I have a cell that has data followed by a hyphen then more data.
EX 12345-ABC456123-more data

I want to copy the first three characters that follow the hyphen so my cell
looks like:

EX ABC

What formula will look to the original cell and remove all the info but keep
the three characters I need?



All times are GMT +1. The time now is 12:49 AM.

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