3 formula's to extract names and numbers

Obewan

Board Regular
Joined
Aug 25, 2021
Messages
68
Office Version
  1. 365
Platform
  1. Windows
Been working though this and have hit a hurdle (namely with the last two on the list). Can anyone suggest a formula for each column that is exactly the same and extract the names and numbers as shown in columns. So need 3 different formulas - i.e. one for which would answer the info in green:
Column B
Column C
Column D

Book5
ABCD
1DataNameNumberBox
2Rug 1PANZA ATTACKPANZA ATTACK11
3Rug 2OUR LUNAOUR LUNA22
4Rug 3ROMENA CHARMROMENA CHARM33
5Rug 4BIG TIMBERBIG TIMBER44
6Rug 5MOON DRAGONMOON DRAGON55
7Rug 6PRINCE OF EGYPTPRINCE OF EGYPT66
8Rug 7SCOTT PLENTYSCOTT PLENTY77
9Rug 8BE CHARMINGBE CHARMING88
10Rug 9GERO LADS(Box 2)GERO LADS92
11Rug 10ZAR ZAR BING(Box 1)ZAR ZAR BING101
Sheet1
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Maybe the below will help?
Book1
ABCD
1DataNameNumberBox
2Rug 1PANZA ATTACKPANZA ATTACK11
3Rug 2OUR LUNAOUR LUNA22
4Rug 3ROMENA CHARMROMENA CHARM33
5Rug 4BIG TIMBERBIG TIMBER44
6Rug 5MOON DRAGONMOON DRAGON55
7Rug 6PRINCE OF EGYPTPRINCE OF EGYPT66
8Rug 7SCOTT PLENTYSCOTT PLENTY77
9Rug 8BE CHARMINGBE CHARMING88
10Rug 9GERO LADS(Box 2)GERO LADS92
11Rug 10ZAR ZAR BING(Box 1)ZAR ZAR BING101
Sheet1
Cell Formulas
RangeFormula
B2:D11B2=LET(rng,A2:A11, num,--TEXTAFTER(LEFT(rng,BYROW(IFERROR(SEARCH({0,1,2,3,4,5,6,7,8,9},TEXTSPLIT(rng,"(")),0),LAMBDA(x,MAX(x))))," "), name,TEXTSPLIT(TEXTAFTER(rng,num,1),"("), tbox,--TEXTBEFORE(TEXTAFTER(rng,"(Box "),")"), box,IF(ISNA(tbox),num,tbox), HSTACK(name,num,box) )
Dynamic array formulas.
 
Upvote 0
Another option one column at a time

Obewan.xlsm
ABCD
1DataNameNumberBox
2Rug 1PANZA ATTACKPANZA ATTACK11
3Rug 2OUR LUNAOUR LUNA22
4Rug 3ROMENA CHARMROMENA CHARM33
5Rug 4BIG TIMBERBIG TIMBER44
6Rug 5MOON DRAGONMOON DRAGON55
7Rug 6PRINCE OF EGYPTPRINCE OF EGYPT66
8Rug 7SCOTT PLENTYSCOTT PLENTY77
9Rug 8BE CHARMINGBE CHARMING88
10Rug 9GERO LADS(Box 2)GERO LADS92
11Rug 10ZAR ZAR BING(Box 1)ZAR ZAR BING101
Sheet1
Cell Formulas
RangeFormula
B2:B11B2=TEXTAFTER(LEFT(A2,FIND("(",A2&"(")-1),SEQUENCE(10)-1,-1)
C2:C11C2=--TEXTAFTER(TEXTBEFORE(A2,B2)," ")
D2:D11D2=--IFNA(TEXTAFTER(TEXTBEFORE(A2,")")," ",-1),C2)



.. or if all together

Obewan.xlsm
ABCD
1DataNameNumberBox
2Rug 1PANZA ATTACKPANZA ATTACK11
3Rug 2OUR LUNAOUR LUNA22
4Rug 3ROMENA CHARMROMENA CHARM33
5Rug 4BIG TIMBERBIG TIMBER44
6Rug 5MOON DRAGONMOON DRAGON55
7Rug 6PRINCE OF EGYPTPRINCE OF EGYPT66
8Rug 7SCOTT PLENTYSCOTT PLENTY77
9Rug 8BE CHARMINGBE CHARMING88
10Rug 9GERO LADS(Box 2)GERO LADS92
11Rug 10ZAR ZAR BING(Box 1)ZAR ZAR BING101
Sheet2
Cell Formulas
RangeFormula
B2:D11B2=LET(d,A2:A11,nme,TEXTAFTER(LEFT(d,FIND("(",d&"(")-1),SEQUENCE(10)-1,-1),num,--TEXTAFTER(TEXTBEFORE(d,nme)," "),box,--IFNA(TEXTAFTER(TEXTBEFORE(d,")")," ",-1),num),HSTACK(nme,num,box))
Dynamic array formulas.
 
Upvote 1
Solution
Maybe the below will help?
Book1
ABCD
1DataNameNumberBox
2Rug 1PANZA ATTACKPANZA ATTACK11
3Rug 2OUR LUNAOUR LUNA22
4Rug 3ROMENA CHARMROMENA CHARM33
5Rug 4BIG TIMBERBIG TIMBER44
6Rug 5MOON DRAGONMOON DRAGON55
7Rug 6PRINCE OF EGYPTPRINCE OF EGYPT66
8Rug 7SCOTT PLENTYSCOTT PLENTY77
9Rug 8BE CHARMINGBE CHARMING88
10Rug 9GERO LADS(Box 2)GERO LADS92
11Rug 10ZAR ZAR BING(Box 1)ZAR ZAR BING101
Sheet1
Cell Formulas
RangeFormula
B2:D11B2=LET(rng,A2:A11, num,--TEXTAFTER(LEFT(rng,BYROW(IFERROR(SEARCH({0,1,2,3,4,5,6,7,8,9},TEXTSPLIT(rng,"(")),0),LAMBDA(x,MAX(x))))," "), name,TEXTSPLIT(TEXTAFTER(rng,num,1),"("), tbox,--TEXTBEFORE(TEXTAFTER(rng,"(Box "),")"), box,IF(ISNA(tbox),num,tbox), HSTACK(name,num,box) )
Dynamic array formulas.
That's a bit complicated for me - how do I enter the range or is it possible to have 3 separate formula's for each column?
 
Upvote 0
If you wanted to change the range, you would change the 'A2:A11' part.

Post 3 has a three column solution.
 
Upvote 0
I think I am getting SPILL as there is a lot other data in column A I didn't put in the minisheet that's corrupting the result.
 
Upvote 0
SPILL error usually means there is data in the way of the formula's spill down area, my solution would require there to be no data in the three columns before you enter the formula. It will then spill down and accross.

Sometimes if you click on the spill formula cell it will show you ith blue lines where it is going to spill to.
 
Upvote 0
I am getting SPILL
Quite likely that you are used to copying the formula down the column, or perhaps down and across.

With the post #2 suggestion and the last suggestion in post #3 you would have nothing at all in the range B2:D11 and put the suggested formula in cell B2 and don't copy it anywhere as it will automatically fill all the other results.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,438
Messages
6,124,873
Members
449,192
Latest member
MoonDancer

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