如何在没有 VBA 或宏的情况下在 excel 中循环? [英] How to loop in excel without VBA or macros?

查看:36
本文介绍了如何在没有 VBA 或宏的情况下在 excel 中循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不安装 VBA 或宏的情况下迭代(循环)Excel 中的一组行?网络搜索没有产生任何有用的信息.

Is it possible to iterate (loop) a group of rows in Excel without VBA or macros installed? A web search didn't yield anything helpful.

=IF('testsheet'!$C$1 <= 99,'testsheet'!$A$1,"") &
IF('testsheet'!$C$2 <= 99, 'testsheet'!$A$2,"") &
IF('testsheet'!$C$3 <= 99, 'testsheet'!$A$3,"") &
... and so on through !$C$40, !$A$40 ...

实际上,我必须在每个单元格中重复上述代码 40 次,而且我有超过 200 个单元格需要代码.

As it is, I'll have to repeat the above code 40 times in each cell and I have over 200 cells which need the code.

我很擅长 PHP/SQL,但只是在学习 Excel.

I'm pretty good with PHP/SQL, but just learning Excel.

推荐答案

获得公式结果的方法是从新工作表开始.

The way to get the results of your formula would be to start in a new sheet.

在A1单元格输入公式

=IF('testsheet'!C1 <= 99,'testsheet'!A1,"") 

将该单元格复制到第 40 行在单元格 B1 中输入公式

Copy that cell down to row 40 In cell B1 put the formula

=A1

在B2单元格输入公式

=B1 & A2

将该单元格复制到第 40 行.

Copy that cell down to row 40.

您想要的值现在位于第 40 行的该列中.

The value you want is now in that column in row 40.

这不是您真正想要的答案,但这是在不创建接受范围并进行计算的自定义公式的情况下以 excel 明智的方式完成工作的最快方法(这样做会更有趣).

Not really the answer you want, but that is the fastest way to get things done excel wise without creating a custom formula that takes in a range and makes the calculation (which would be more fun to do).

这篇关于如何在没有 VBA 或宏的情况下在 excel 中循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆