如何循环使用没有VBA或宏的excel? [英] How to loop in excel without VBA or macros?
问题描述
可以在没有安装VBA或宏的Excel中迭代(循环)一组行吗? Google没有提供任何帮助。
Is it possible to iterate (loop) a group of rows in Excel without VBA or macros installed? Google 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. sniff
我非常适合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中,使用公式
In cell A1 put the formula
=IF('testsheet'!C1 <= 99,'testsheet'!A1,"")
到行40
在单元格B1中,公式
Copy that cell down to row 40 In cell B1 put the formula
=A1
在单元格B2中设置公式
In cell B2 put the formula
=B1 & A2
将该单元格复制到第40行。
Copy that cell down to row 40.
你想要的值现在在第40行的列。
The value you want is now in that column in row 40.
不是真正的你想要的答案,但这是最好的方法来完成工作而不需要创建一个自定义公式,该公式需要一个范围并进行计算(这将更有趣)。
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屋!