Pull Text Only String "PT" & "CV"

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,105
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all....

i want to extract/pull text and get string only "PT" and "CV" 2 character from left text

[TABLE="width: 1, align: left"]
<tbody>[TR]
[TH="bgcolor: #FFFF00"]SAMPLE[/TH]
[TH="bgcolor: #FFFF00"]EXPECTED RESULT[/TH]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]CV. SINAR TERANG TERHUTANG[/TD]
[TD="bgcolor: #FFFFFF"]CV[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]PT OLYMPIA VENEER PRODUCT[/TD]
[TD="bgcolor: #FFFFFF"]PT[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]PT SUMATRA TIMUR INDONESIA PROYEK [/TD]
[TD="bgcolor: #FFFFFF"]PT[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]PT. SHIELDS INDONESIA[/TD]
[TD="bgcolor: #FFFFFF"]PT[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]CV JASA KARYA[/TD]
[TD="bgcolor: #FFFFFF"]CV[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]RAHIMAH / CEMPAKA AYU[/TD]
[TD="bgcolor: #FFFFFF"]blank[/TD]
[/TR]
[TR]
[TD="bgcolor: #FFFFFF"]DWIYONO SUBIANTOSO / MITRA ABADI [/TD]
[TD="bgcolor: #FFFFFF"]blank[/TD]
[/TR]
</tbody>[/TABLE]













any assistance, much appreciated..

m.susanto
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
hi all....

i want to extract/pull text and get string only "PT" and "CV" 2 character from left text
Will it always be either PT, CV or nothing? If so the following formula will do the trick (assuming your list starts in A1):

=IF(LEFT(A1,2)="CV","CV",IF(LEFT(A1,2)="PT","PT",""))

This can be drag-filled down the length of your list.
 
Upvote 0

Excel 2010
AB
1CV. SINAR TERANG TERHUTANGCV
2PT OLYMPIA VENEER PRODUCTPT
3PT SUMATRA TIMUR INDONESIA PROYEKPT
4PT. SHIELDS INDONESIAPT
5CV JASA KARYACV
6RAHIMAH / CEMPAKA AYU DWIYONO SUBIANTOSO / MITRA ABADI
Sheet1
Cell Formulas
RangeFormula
B1=CHOOSE(IFERROR(MATCH(1,FIND({"CV","PT"},LEFT(A1,2)),0),0)+1,"","CV","PT")
 
Last edited:
Upvote 0
hi guys...i have a new problem this below :

[TABLE="align: left"]
<tbody>[TR]
[TH][/TH]
[TH][/TH]
[/TR]
</tbody>[/TABLE]


[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]PT. SHIELDS INDONESIA[/TH]
[TH]PT[/TH]
[/TR]
[TR]
[TD]CV JASA KARYA[/TD]
[TD]CV[/TD]
[/TR]
[TR]
[TD]SHIELDS INDONESIA, PT[/TD]
[TD]PT[/TD]
[/TR]
[TR]
[TD]JASA KARYA, CV[/TD]
[TD]CV[/TD]
[/TR]
[TR]
[TD]SHIELDS INDONESIA[/TD]
[TD]blank[/TD]
[/TR]
</tbody>[/TABLE]



have you great idea?
 
Last edited:
Upvote 0
Tweaking Comfy's solution.

=IFERROR(CHOOSE(MATCH(TRUE,ISNUMBER(FIND({"CV","PT"},A1)),0),"CV","PT"),"")
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,708
Members
453,748
Latest member
akhtarf3

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
Back
Top