如何创建一个奇偶数列的公式

huangapple go评论57阅读模式
英文:

How to create an Even Odd Number Series formula

问题

以下是翻译好的内容:

列 A: 列 B
Sku.100 ck.1
Sku.100 ck.1
Sku.101 ck.1
Sku.102 ck.2
Sku.102 ck.2
Sku.103 ck.2
Sku.104 ck.3
Sku.104 ck.3
Sku.105 ck.3

列 A:两次偶数,然后1个奇数
列 B:3个相同数字的系列

英文:

is there a way to automatically fill a column with the following sequence:

Column A: Column B
Sku.100 ck.1
Sku.100 ck.1
Sku.101 ck.1
Sku.102 ck.2
Sku.102 ck.2
Sku.103 ck.2
Sku.104 ck.3
Sku.104 ck.3
Sku.105 ck.3

Column A Twice even numbers, then 1 odd number
Column B series of 3 same numbers
Thanks in advance.

答案1

得分: 4

=LET(
x, "Sku." &
TOCOL(
SEQUENCE(
1000,
,
100,
2
) + {0, 0, 1}
),
y, "ck." &
INT(
SEQUENCE(
ROWS(x),
,
,
1 / 3
)
),
HSTACK(x, y)
)

英文:

Assuming there is no Excel Version Constraints, you could try this using SEQUENCE() function.

如何创建一个奇偶数列的公式


• Formula used in cell A1

=LET(
    x, "Sku." &
        TOCOL(
            SEQUENCE(
                1000,
                ,
                100,
                2
            ) + {0, 0, 1}
        ),
    y, "ck." &
        INT(
            SEQUENCE(
                ROWS(x),
                ,
                ,
                1 / 3
            )
        ),
    HSTACK(x, y)
)

huangapple
  • 本文由 发表于 2023年5月21日 20:48:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76299981.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定