Retrieve Left Symbol from String

ONP Nino

New Member
Joined
Apr 2, 2018
Messages
17
Office Version
  1. 2019
Platform
  1. Windows
Hello, :)

I would like to retrieve/extract The Symbol Highlighted in Red from The following strings. Basically it will always be from the first "/" starting from Left
Length and placement of symbol is always a bit different.
Just Recently A Well KnownMember here helped me retrieving the far right Symbol starting at "/" and ending at ":". with the following formula
="/" & TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(A2,":",REPT(" ",999),LEN(A2)-LEN(SUBSTITUTE(A2,":",""))),999)),"/",REPT(" ",99)),99))
Formula works great, but now I am in need of the Left symbol.

SOLD -1 /ESM23:XCME 1/50 23 MAR 23 (Thursday) (Wk4) /E4DH23:XCME 4010 CALL @6.50
SOLD 4.0 /ESH22:XCME @4720.0 upon Assignment 4.0 /ESH22:XCME 1/50 31 DEC 21 (EOM) /EWZ21:XCME 4720 CALL
SOLD -1 /ESM23:XCME 1/50 MAY 23 (Wk3) /EW3K23:XCME 4200 CALL @39.75
BOT +4 /ESM23:XCME 1/50 MAR 23 (Monday) (Wk5) /E4AH23:XCME 4035 CALL @7.00
SOLD -5 /ESM23:XCME 1/50 MAR 23 (Tuesday) (Wk5) /E4BH23:XCME 4015 CALL @15.00
/ESM20:XCME mark to market at 2941.00 official settlement price
tAndroid BOT +1 /ESM20:XCME @2922.00
SOLD -10 FUT CALENDAR /MESH21:XCME - /MESZ20:XCME @-8.00
/MESM21:XCME mark to market at 4193.80 official settlement price
SOLD -5 /MESU21:XCME @4200.00


Using MS Office Excel 2019
Thank you for your help. It is greatly appreciated:)
Cheers
OP
 
I am glad you posted your formula. It works super.
You're welcome. Glad to contribute. As you can see there are many ways to arrive at the desired result. :)

for some reason I am unable to See a result in the cell from Fluff's code. Hmm, not sure whats happening??? I get the full formula as a result.
Perhaps that cell or column is formatted as Text and not as General?
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

In 2019 have you TEXTBEFORE and TEXTAFTER? Formula will be easy.
 
Upvote 0
Doesn't that last formula remove the last character of the required extraction? That is, it returns /ESM23:XCM for cell A2 and not /ESM23:XCME
Good spot Peter, forgot to change the 2nd Replace, so it should be
Excel Formula:
=LEFT(REPLACE(A2,1,FIND("/",A2)-1,""),FIND(" ",REPLACE(A2,1,FIND("/",A2)-1,""))-1)
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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