Georgiboy
Well-known Member
- Joined
- Nov 7, 2008
- Messages
- 1,501
- Office Version
- 365
- 2016
- Platform
- Windows
Hi all,
Seem to be having some brain fog this morning and have been pondering the below overnight. If i use REPT with SEQUENCE on one row, i.e. one text value and one number for REPT then i get my expected result. If i extend this range to two text cells and two number cells then i only get one of each value. I suppose i am not simply looking for the solution but interested to know why it only gives me one result per row - what is Excels logic:
Seem to be having some brain fog this morning and have been pondering the below overnight. If i use REPT with SEQUENCE on one row, i.e. one text value and one number for REPT then i get my expected result. If i extend this range to two text cells and two number cells then i only get one of each value. I suppose i am not simply looking for the solution but interested to know why it only gives me one result per row - what is Excels logic:
Lambda-map examples.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Two versions of a formula working in one row | ||||||||
2 | Scania | 5 | Scania | Scania | |||||
3 | Volvo | 3 | Scania | Scania | |||||
4 | Scania | Scania | |||||||
5 | Scania | Scania | |||||||
6 | Scania | Scania | |||||||
7 | |||||||||
8 | Same Formula with both rows | ||||||||
9 | Scania | 5 | Scania | Scania | |||||
10 | Volvo | 3 | Volvo | Volvo | |||||
11 | |||||||||
12 | |||||||||
13 | |||||||||
14 | |||||||||
15 | Expected result | ||||||||
16 | Scania | 5 | Scania | Scania | |||||
17 | Volvo | 3 | Scania | Scania | |||||
18 | Scania | Scania | |||||||
19 | Scania | Scania | |||||||
20 | Scania | Scania | |||||||
21 | Volvo | Volvo | |||||||
22 | Volvo | Volvo | |||||||
23 | Volvo | Volvo | |||||||
Sheet5 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E6 | E2 | =REPT(A2,SEQUENCE(B2,,1,0)) |
G2:G6 | G2 | =A2&T(SEQUENCE(B2)) |
E9:E10 | E9 | =REPT(A9:A10,SEQUENCE(B9:B10,,1,0)) |
G9:G10 | G9 | =A9:A10&T(SEQUENCE(B9:B10)) |
Dynamic array formulas. |