extract text from cells

vbachanger

New Member
Joined
Sep 15, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I have the following text, I need to extract. How do I need to change the formula, that the output looks like in column B?

extract.xlsx
ABC
1G-84/3/09542984/0384/3/
2G-84/30/0954284/3084/30
Sheet1
Cell Formulas
RangeFormula
C1:C2C1=MID(A1,3,RIGHT(FIND("/",A1)))


THX
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Maybe
Excel Formula:
=MID(A1,3,FIND("^",SUBSTITUTE(A1,"/","^",2))-3)
 
Upvote 0
Maybe
Excel Formula:
=MID(A1,3,FIND("^",SUBSTITUTE(A1,"/","^",2))-3)

extract.xlsx
ABC
1G/84/3/09542984/0384
2G/84/30/0954284/3084
Sheet1
Cell Formulas
RangeFormula
C1:C2C1=MID(A1,3,FIND("^",SUBSTITUTE(A1,"/","^",2))-3)


Thank you great :) This works!

What if there are only slashes /in column A?

After the second / is one digit (3), it should show 03 in column B.

Thanks!
 
Upvote 0
How about
Excel Formula:
=LET(m,MID(A1,3,FIND("^",SUBSTITUTE(A1,"/","^",3))-3),IF(LEN(m)=4,SUBSTITUTE(m,"/","/0"),m))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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