Text Split or any other formula

ChetanPuri

Board Regular
Joined
Sep 5, 2018
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Good Morning Excel Gurus,

Is there a formula, that I am able split data in the below format for example Value in P2 if its in format R2402/104/PR, then it splits in T2, U 2 and V2 , even though I put the formula in Col;umn S2 as I want any number, for example 40719240 to appear in S2 and if its not a number or is it with Delimiter should be split in column T,U and V. Any help would be appreciated


V4 Telstra Download 2024-11-21.xlsm
PQRSTUV
1GL CodeSPLITTex Split
2R2402/104/PR53R2402104PR
3D100/130/MT33D100130MT
4D100/130/MT66D100130MT
5D100/160/MT66D100160MT
6D100/160/MT61D100160MT
7D100/140/MT33D100140MT
8C241/0800/PR53C2410800PR
9C241/0800/PR53C2410800PR
10C242/0800/PR14.5C2420800PR
11C241/0800/PR14.5C2410800PR
12C241/0800/PR53C2410800PR
13C241/0800/PR50C2410800PR
14C241/0800/PR62.99C2410800PR
15407192405340719240  
16101192407010119240  
1711229392354.9911229392  
18101192407010119240  
194071924013540719240  
204073971016540739710  
21DN04B/0800/PR85DN04B0800PR
Detail Report
Cell Formulas
RangeFormula
T15:T21T15=IFERROR(MID(P15,FIND("/",P15)+1,FIND("/",P15,FIND("/",P15)+1)-FIND("/",P15)-1),"")
U15:U21U15=IFERROR(MID(P15,FIND("/",P15,FIND("/",P15)+1)+1,LEN(P15)),"")
Q2:Q21Q2=O2*A2
S21S21=IFERROR(VALUE(P21),MID(P21,1,FIND("/",P21&"/")-1))
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try this:

Book1
PQRSTUV
1GL CodeSPLITTex Split
2R2402/104/PR0 R2402104PR
3D100/130/MT0 D100130MT
4D100/130/MT0 D100130MT
5D100/160/MT0 D100160MT
6D100/160/MT0 D100160MT
7D100/140/MT0 D100140MT
8C241/0800/PR0 C2410800PR
9C241/0800/PR0 C2410800PR
10C242/0800/PR0 C2420800PR
11C241/0800/PR0 C2410800PR
12C241/0800/PR0 C2410800PR
13C241/0800/PR0 C2410800PR
14C241/0800/PR0 C2410800PR
1540719240040719240
1610119240010119240
1711229392011229392
1810119240010119240
1940719240040719240
2040739710040739710
21DN04B/0800/PR0 DN04B0800PR
Sheet1
Cell Formulas
RangeFormula
Q2:Q21Q2=O2*A2
S21:V21,S15:S20,S2:V14S2=IF(ISNUMBER(P2),P2,TEXTSPLIT("/"&P2,"/"))
Dynamic array formulas.
 
Upvote 0
Another way:
=DROP(TEXTSPLIT("/"&P2,"/"),,--ISNUMBER(P2))

Book1
PQRSTUV
1GL CodeSPLITTex Split
2R2402/104/PR0 R2402104PR
3D100/130/MT0 D100130MT
4D100/130/MT0 D100130MT
5D100/160/MT0 D100160MT
6D100/160/MT0 D100160MT
7D100/140/MT0 D100140MT
8C241/0800/PR0 C2410800PR
9C241/0800/PR0 C2410800PR
10C242/0800/PR0 C2420800PR
11C241/0800/PR0 C2410800PR
12C241/0800/PR0 C2410800PR
13C241/0800/PR0 C2410800PR
14C241/0800/PR0 C2410800PR
1540719240040719240
1610119240010119240
1711229392011229392
1810119240010119240
1940719240040719240
2040739710040739710
21DN04B/0800/PR0 DN04B0800PR
Sheet1
Cell Formulas
RangeFormula
Q2:Q21Q2=O2*A2
S21:V21,S15:S20,S2:V14S2=DROP(TEXTSPLIT("/"&P2,"/"),,--ISNUMBER(P2))
Dynamic array formulas.
 
Upvote 0
If I am not mistaken, this single formula should generate all four of the columns you want...
Excel Formula:
=LET(t,TEXTSPLIT(TEXTAFTER("/"&P2:P195,"/",{1,2,3}),"/",,1),HSTACK(TAKE(IF(ISERROR(TAKE(t,,-1)),t,""),,1),IF(ISNUMBER(-TAKE(t,,1)),"",IF(NOT(ISERROR(t)),t,""))))
 
Upvote 0
Another way:
Excel Formula:
=IFNA(DROP(REDUCE("",P2:P195,LAMBDA(a,b,VSTACK(a,TEXTSPLIT("/"&b,"/",,ISNUMBER(b))))),1),"")
 
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,862
Members
452,676
Latest member
woodyp

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