lrobbo314
Well-known Member
- Joined
- Jul 14, 2008
- Messages
- 3,963
- Office Version
- 365
- Platform
- Windows
XRNG will return a sequence given a start, end, and step argument.
Excel Formula:
=LAMBDA(
start,end,[step],
LET(
b,IF(ISOMITTED(step),1,step),
SEQUENCE((end-start)/b+1,,start,b)
)
)
XRNG | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Start | 65 | 2 | 10 | ||
2 | End | 90 | 40 | 100 | ||
3 | Step | 2 | 10 | |||
4 | 65 | 2 | 10 | |||
5 | 66 | 4 | 20 | |||
6 | 67 | 6 | 30 | |||
7 | 68 | 8 | 40 | |||
8 | 69 | 10 | 50 | |||
9 | 70 | 12 | 60 | |||
10 | 71 | 14 | 70 | |||
11 | 72 | 16 | 80 | |||
12 | 73 | 18 | 90 | |||
13 | 74 | 20 | 100 | |||
14 | 75 | 22 | ||||
15 | 76 | 24 | ||||
16 | 77 | 26 | ||||
17 | 78 | 28 | ||||
18 | 79 | 30 | ||||
19 | 80 | 32 | ||||
20 | 81 | 34 | ||||
21 | 82 | 36 | ||||
22 | 83 | 38 | ||||
23 | 84 | 40 | ||||
24 | 85 | |||||
25 | 86 | |||||
26 | 87 | |||||
27 | 88 | |||||
28 | 89 | |||||
29 | 90 | |||||
Sheet2 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B4:B29 | B4 | =XRNG(B1,B2) |
C4:C23,D4:D13 | C4 | =XRNG(C1,C2,C3) |
Dynamic array formulas. |
Upvote
0