about right,find functions

curtisw

New Member
Joined
Oct 21, 2011
Messages
27
gvMGcH2.jpg


I just want to show ST01,but why it still shows f, fo, for..etc in different cells with the same formula?

thanks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Right(len(a1)-etc..

equates to right(25-18) for the first entry.

25-18 = 7, there is no second argument for the RIGHT function so it defaults to 1 character, resulting in mid(a1,find("ST",a1,7)

St-01 f is 7 characters long.

Try

=IF(ISNUMBER(FIND("ST",A1)),MID(A1,FIND("ST",A1),FIND(" for",A1,FIND("ST",A1))-FIND("ST",A1)),"")
 
Upvote 0
I didn't add in all the error checks, but here is a formula that works for your examples. It finds ST, and then the first space after that in order to determine how much to pull:

=MID(A1,FIND("ST",A1),FIND(" ",A1,FIND("ST",A1))-FIND("ST",A1))
 
Upvote 0

Forum statistics

Threads
1,203,455
Messages
6,055,540
Members
444,794
Latest member
HSAL

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