Using mid/len/left/right/find

Accountant2B

New Member
Joined
Mar 2, 2021
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
I need excel formulas that will help me differentiate each piece of these cells. Here are examples of the cells

Elephant12-8Wb
CAT193-45M
I already have the formula to get Elephant and CAT on their own. But then I need formulas to get 12 and 193, 8 and 45, and Wb and M on their own.

Thank you in advance

1614968351664.png
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Welcome to Mr Excel :)

Does this help?
Book1
ABCD
1Elephant12-8WbElephant128Wb
2CAT193-45MCAT19345M
3Bug123-456MoBug123456Mo
Sheet2
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1)
C1:C3C1=MID(A1,LEN(B1)+1,FIND("-",A1)-(LEN(B1)+1))
D1:D3D1=MID(A1,FIND("-",A1)+1,255)
 
Upvote 0
Welcome to Mr Excel :)

Does this help?
Book1
ABCD
1Elephant12-8WbElephant128Wb
2CAT193-45MCAT19345M
3Bug123-456MoBug123456Mo
Sheet2
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1)
C1:C3C1=MID(A1,LEN(B1)+1,FIND("-",A1)-(LEN(B1)+1))
D1:D3D1=MID(A1,FIND("-",A1)+1,255)
Yes!! Thank you!
Is there any way you would know how to get column D into separate values? For example cell D1 to be 8 in one column and Wb in another column?
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDE
3Elephant12-8WbElephant128Wb
4CAT193-45MCAT19345M
5Bug1234-567MoBug1234567Mo
Main
Cell Formulas
RangeFormula
B3:B5B3=LEFT(A3,MIN(FIND(ROW($1:$10)-1,A3&"0123456789"))-1)
C3:C5C3=TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(A3,B3,""),"-",REPT(" ",20)),20))
D3:D5D3=LEFT(SUBSTITUTE(A3,B3&C3&"-",""),MIN(SEARCH(CHAR(ROW($65:$90)),SUBSTITUTE(A3,B3&C3&"-","")&CHAR(ROW($65:$90))))-1)
E3:E5E3=SUBSTITUTE(A3,B3&C3&"-"&D3,"")
 
Upvote 0
Like this?

As you're using Excel 2019, the formulas in columns C and D may need array confirming with Ctrl Shift Enter.

edit:- @Fluff, I'm looking at your column D formula and thinking about rows being deleted :eek:
Book1
ABCDE
1Elephant12-8WbElephant128Wb
2CAT193-45MCAT19345M
3Bug123-456MoBug123456Mo
Sheet2
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1)
C1:C3C1=MID(A1,LEN(B1)+1,FIND("-",A1)-(LEN(B1)+1))
D1:D3D1=MID(A1,FIND("-",A1)+1,MAX(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1),0))-FIND("-",A1))
E1:E3E1=MID(A1,MAX(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1),0))+1,255)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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