简体   繁体   English

Microsoft Excel公式可填充一系列单元格

[英]Microsoft Excel Formula to fill a range of cells

I'm working on a project that will assist in our design department. 我正在研究一个将协助我们设计部门的项目。 I came across an issue, which I have spent almost a week on without much success. 我遇到了一个问题,我花了近一个星期的时间才取得成功。

Let's say I have the following values in A1 and A2 : 假设我在A1和A2中具有以下值:

  • A1 = 4 A1 = 4
  • A2 = 3 A2 = 3

Final result: 最后结果: 在此处输入图片说明

I have tried many formulas, but none can give the result I desire, from If-Array, etc and I am out of ideas. 我尝试了许多公式,但是没有一个可以从If-Array等中给出我想要的结果,并且我没有主意。

Any assistance will be greatly appreciated. 任何帮助将不胜感激。

Thank you, Steven 谢谢史蒂文

=IF(COLUMN()<=$A$1,1,IF(COLUMN()<=$A$1+$A$2,2)) 

In A5 then copy to right. 然后在A5中向右复制。

(as per comments) (根据评论)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM