Required Excel Formula or VBA code to extract Numbers from String after special character "/" with 3 condition

Harmandeep

New Member
Joined
Dec 19, 2022
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi Excel Experts,

I am trying to extract Numbers from String after special character "/" with Formula 'MID(A2, SEARCH("/",A2) + 1, SEARCH("/",A2,SEARCH("/",A2)+1) - SEARCH("/",A2) - 1)'. I have 3 diff types of String it works fine in 1 condition but failed to extract in rest 2 condition. I am attaching sample data table below & image for your reference.

ParticularsResult with FormulaExpected Result
IFT/CB0023519258/2000189024/MAHANADI COALFIELDS LCB0023519258CB0023519258
IMPS/P2A/235314533268/DIGITALI/IDFCBank/IMPSTXNP2A235314533268
NEFT/000001993682/2780032276/LAVYA MARKETING000001993682000001993682
RTGS/CBINR52022122810002779/18NEWDISTR/VINAYAK ENCBINR52022122810002779CBINR52022122810002779
TRANSFER/IC/25-980520196-1/ARPIT ENTERPRISE/WatchIC25-980520196-1
UPI/P2A/235423827250/KRISHAN K/Bank of B/UPIP2A235423827250
IMPS/234004143173
#VALUE!
234004143173
 

Attachments

  • String.PNG
    String.PNG
    19.4 KB · Views: 5
Hi Fluff can we add one more condition in this formula if "/" not found then it will split on "-" this character. E.g.-"NEFT-PUNBD22351007512-DISL8219658860-RAVI AUDIO VIDEO PROP RAVI DASS-8725210023" this kind of text is given instead of "MMT/IMPS/235111346866/DISL9142180005/MASTACOMMU".
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
How about
Excel Formula:
=LET(a,TEXTSPLIT(A2,{"/","-"}),IF(COLUMNS(a)=1,a,TAKE(FILTER(DROP(a,,1),LEN(DROP(a,,1))>3),,1)))
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,093
Members
448,944
Latest member
SarahSomethingExcel100

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