Array to return Multiple Results (maybe byrow function)

pto160

Active Member
Joined
Feb 1, 2009
Messages
482
Office Version
  1. 365
Platform
  1. Windows
I am trying to use Textsplit with byrow to return multiple results, but I am getting a CALC error. Ignore the name error. This is my personal computer. The ":" is the delimiter.

Book1
AB
1Product
21800:9400
32400:2500
4
5#NAME?
6
7Result I would like
81800
99400
102400
112500
Sheet1
Cell Formulas
RangeFormula
B5B5=BYROW(A2:A3,LAMBDA(x,TEXTSPLIT(x,,":")))
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Perhaps:
=TEXTSPLIT(TEXTJOIN(":",TRUE,A2:A3),,":")

Book1
A
1Product
21800:9400
32400:2500
4
5
6
7Result I would like
81800
99400
102400
112500
Sheet1
Cell Formulas
RangeFormula
A8:A11A8=TEXTSPLIT(TEXTJOIN(":",TRUE,A2:A3),,":")
Dynamic array formulas.
 
Last edited:
Upvote 0
Try:
Book1
AB
1Product
21800:9400
32400:2500
4
51800
69400
7Result I would like2400
818002500
99400
102400
112500
Sheet1
Cell Formulas
RangeFormula
B5:B8B5=TOCOL(TEXTSPLIT(TEXTJOIN(":",TRUE,A2:A3),":"))
Dynamic array formulas.
 
Upvote 0
You shouldn't need the TOCOL if you put the : in the row delimiter instead of the column delimiter in TEXTSPLIT.
 
Upvote 0
I didn't know that. The col_delimiter do not have the [] brackets so appear to be a required parameter while the row is optional.

1713823746130.png
 
Upvote 0
Absolutely fantastic. Thank you so much to everyone. I am using this with check numbers to import into my accounting system. Is it possible to do the following below?

Book1
AB
1ProductCheck
21800:94001445
32400:25001446
4
5#NAME?
6
7Result I would like
8ProductCheck
918001445
1094001445
1124001446
1225001446
Sheet1
Cell Formulas
RangeFormula
B5B5=BYROW(A2:A3,LAMBDA(x,TEXTSPLIT(x,,":")))
 
Upvote 0
Will column A ever have more than 2 values? e.g. 1800:9400:1600
 
Upvote 0
Sometimes, yes, unfortunately there will be more than 2 values.
 
Upvote 0
I don't know if there's a simpler way but try this. Note that column B requires an additional blank cell.
Book3 (version 1).xlsb
AB
1ProductCheck
21800:9400:1600:8001445
31800:24001446
4
5
6
7Result I would like
8ProductCheck
918001445
1094001445
1116001445
128001445
1318001446
1424001446
Sheet8
Cell Formulas
RangeFormula
A9:B14A9=LET( ct,VSTACK(0,BYROW(A2:A3,LAMBDA(br,COLUMNS(TEXTSPLIT(br,":"))))), t,TEXTSPLIT(TEXTJOIN(":",TRUE,A2:A3),,":"), l,XLOOKUP(SEQUENCE(SUM(ct)),SCAN(1,ct,LAMBDA(a,b,a+b)),B2:B4,,-1), HSTACK(t,l))
Dynamic array formulas.
 
Upvote 0
This works absolutely great. :)(y) This will save me so much time at work. Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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