FIND for two strings

frankee_gee

Board Regular
Joined
Mar 3, 2008
Messages
144
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello World - looking for help on the following excel formula. I would like to search for two (2) text strings, "RT" and "ST" in the FIND area.

This formula is what I'm currently using and for every "ST" I receive an error "#VALUE!"

Excel Formula:
=IF(RIGHT([@[ST_Supplier Part Number]],1)="N",
LEFT([@[ST_Supplier Part Number]],FIND("RT",[@[ST_Supplier Part Number]])-1)&"N",
LEFT([@[ST_Supplier Part Number]],FIND("RT",[@[ST_Supplier Part Number]])-1))

here's a pic of what I get in return in [column1]
1669146068822.png


return

INPC
INPCN
INPS
INPSN



Thank you for your help in advance.

Frankee
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
How about
Fluff.xlsm
AB
1
2916FRTN916FN
3917FRT917F
4INPCSTINPC
5INPCSTNINPCN
Data
Cell Formulas
RangeFormula
B2:B5B2=LEFT(A2,MIN(IFERROR(FIND({"RT","ST"},A2),""))-1)&IF(RIGHT(A2)="N","N","")
 
Upvote 0
Maybe just
Excel Formula:
=SUBSTITUTE(SUBSTITUTE([@[ST_Supplier Part Number]],"RT",""),"ST","")
 
Upvote 0
Perfect. Thank you so much...I always complicate things...nice and clean.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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