如何输入最小/最大值并让Excel为范围中的每个数字生成单元格

时间:2022-09-26 21:26:52

I have 2 cells A2 and A3, I will input a min value and max value respectively in each cell. Say 100 in A2 and 200 in A3.

我有2个单元格A2和A3,我将在每个单元格中分别输入最小值和最大值。在A2中说100,在A3中说200。

I would like Excel to populate cells with values within that range. So Column B would have cells 1-101 filled in with 100,101,103,104,105....200.

我希望Excel使用该范围内的值填充单元格。因此B列将填充100,101,103,104,105 ...... 200的单元格101。

Is there any easy way to do this or should I just stick to putting 100 in B1 and dragging it down?

有没有简单的方法可以做到这一点,或者我应该坚持将100放入B1并将其拖下来?

1 个解决方案

#1


0  

In you first cell:

在你的第一个细胞:

=IF(ROW(1:1)-1+$A$2<=$A$3,ROW(1:1)-1+$A$2,"")

Then drag/copy the cells down far enough to cover any combination you will have. You can fill the whole column if you want.

然后将单元格向下拖动/复制到足以覆盖您将拥有的任何组合。如果需要,您可以填写整个列。

如何输入最小/最大值并让Excel为范围中的每个数字生成单元格

#1


0  

In you first cell:

在你的第一个细胞:

=IF(ROW(1:1)-1+$A$2<=$A$3,ROW(1:1)-1+$A$2,"")

Then drag/copy the cells down far enough to cover any combination you will have. You can fill the whole column if you want.

然后将单元格向下拖动/复制到足以覆盖您将拥有的任何组合。如果需要,您可以填写整个列。

如何输入最小/最大值并让Excel为范围中的每个数字生成单元格