ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I copy part of each cell in a column? (https://www.excelbanter.com/excel-discussion-misc-queries/25474-how-do-i-copy-part-each-cell-column.html)

I should know this!

How do I copy part of each cell in a column?
 
I have a column of data - ie: (1APB-0101) BFP Motor Valve
I want to copy the information in ( ) to another column.
How can I do this?


Bob Umlas

=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)
and fill down

"I should know this!" <I should know wrote
in message ...
I have a column of data - ie: (1APB-0101) BFP Motor Valve
I want to copy the information in ( ) to another column.
How can I do this?




JE McGimpsey

One way:

If all the items inside parens in the column are 9 characters long:

=MID(A1,2,9)

if the items inside parens vary in length (but are at the beginning):

=MID(A1,2,FIND(")",A1)-2)

if the items in parens may not be at the beginning:

=MID(LEFT(A1,FIND(")",A1)-1),FIND("(",A1)+1,255)

Where 255 is just a number larger than any potential string inside
parens.

In article ,
"I should know this!" <I should know
wrote:

I have a column of data - ie: (1APB-0101) BFP Motor Valve
I want to copy the information in ( ) to another column.
How can I do this?



All times are GMT +1. The time now is 03:16 AM.

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