Separating P/N from Desc and placing it in separate columns

Zac

Well-known Member
Joined
Feb 20, 2002
Messages
796
Here's an ie: of my data:

HW0000036 TFE Thread Tape (48 FT)
HW0000150 Clamp, Hose, Nylon, 1/4\'94
KIT000093 CD, UV Filter 214 NM

What's the easiest way to extract the P/n and Description and place it in separate columns.

A1 to B1 and C1

I used =LEFT(A1,8) for the P/N.
Of course this is only good if the P/N's are the same length.

How do I handle the DESC?

Or is there an easier way?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Try:

for P/N
=LEFT(A1,FIND(" ",A1)-1)

and

for descr.
=TRIM(SUBSTITUTE(A1,B1,""))
 

Zac

Well-known Member
Joined
Feb 20, 2002
Messages
796
I tried the fx =LEFT(A5,FIND(" ",A5)-1) on the following data in A5.

000090000 Mixer Board

works great.



=TRIM(SUBSTITUTE(A5,C5,""))
This fx did not work. I get a blank space in C5. !!
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Where did you put the Left() formula. That cell reference is what you use in the 2nd argument of the the Substitute() formula.

e.g. If you place your Left() in B5, then the other formula is =TRIM(SUBSTITUTE(A5,B5,""))
 

Zac

Well-known Member
Joined
Feb 20, 2002
Messages
796
Made my correction and all works great.

Thnx
 

Forum statistics

Threads
1,137,059
Messages
5,679,369
Members
419,824
Latest member
Mercy kiara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top