Text+Number split

nburaq

Board Regular
Joined
Apr 2, 2021
Messages
220
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi Gents,
I need to split values which are mix of letters and number into a logical notation. first sheet includes only values to be splitted and second sheet is a solution as how it needs to be splitted.
Group 1 always starts with letters ( it might be single letter or double or triple)
Group 2 is 3digits (generally 3 digit number but it might include letters as well like _WI or 5W2)
Group 3 is always 2 digits depending on total character number
Group 4 is always whatever left after group3
I hope there is a solution. Thanks in advance!

empty sheet
Book1
ABCDE
1locationgroup1group2group3group4
2Y401
3Y202A
4SI_W1
5L166BA
6Y5100ET
7L8010XC
8Y202D3TT
9B109A0XS
10SI_W2_H
11BF117CC0SC
12PI050C1_2E
13SI08511_KL
14BFA119CD0SC
Sheet2


how it needs to be:
Book1
ABCDE
1locationgroup1group2group3group4
2Y401Y401
3Y202AY202A
4SI_W1SI_W1
5L166BAL166BA
6Y5100ETY5100ET
7L8010XCL8010XC
8Y202D3TTY202D3TT
9B109A0XSB109A0XS
10SI_W2_HSI_W2_H
11BF117CC0SCBF117CC0SC
12PI050C1_2EPI050C1_2E
13SI08511_KLSI08511_KL
14BFA119CD0SCBFA119CD0SC
Sheet1
 

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 Gents,
I need to split values which are mix of letters and number into a logical notation. first sheet includes only values to be splitted and second sheet is a solution as how it needs to be splitted.
Group 1 always starts with letters ( it might be single letter or double or triple)
Group 2 is 3digits (generally 3 digit number but it might include letters as well like _WI or 5W2)
Group 3 is always 2 digits depending on total character number
Group 4 is always whatever left after group3

Hi,

Can you clarify Bold/Underlined above.
What's the difference between your expected results in Row 6, 7, 10 ???
 
Upvote 0
Hi,

Can you clarify Bold/Underlined above.
What's the difference between your expected results in Row 6, 7, 10 ???
Hi,
Thanks for the help. You can ignore row 10 and for row 6 and 7 after 3 digit number it can start 0ET and 0XC in group 3
 
Upvote 0
Hi,
Thanks for the help. You can ignore row 10 and for row 6 and 7 after 3 digit number it can start 0ET and 0XC in group 3

Does this work for you:

Book3.xlsx
ABCDE
1locationgroup1group2group3group4
2Y401Y401  
3Y202AY202A 
4SI_W1SI_W1  
5L166BAL166BA 
6Y5100ETY5100ET
7L8010XCL8010XC
8Y202D3TTY202D3TT
9B109A0XSB109A0XS
10SI_W2_HSI_W2_H 
11BF117CC0SCBF117CC0SC
12PI050C1_2EPI050C1_2E
13SI08511_KLSI08511_KL
14BFA119CD0SCBFA119CD0SC
Sheet1038
Cell Formulas
RangeFormula
B2:B14B2=LEFT(A2,MIN(FIND("_",A2&"_"),MIN(FIND({0,1,2,3,4}+{0;5},A2&1/17)))-1)
C2:C14C2=MID(A2,LEN(B2)+1,3)
D2:D14D2=MID(A2,LEN(B2)+LEN(C2)+1,2)
E2:E14E2=REPLACE(A2,1,LEN(B2)+LEN(C2)+LEN(D2),"")
 
Last edited:
Upvote 0
Solution
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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