How to loop in excel without VBA or macros?

前端 未结 6 567
Happy的楠姐
Happy的楠姐 2020-12-13 12:58

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$         


        
6条回答
  •  长情又很酷
    2020-12-13 13:08

    Add more columns when you have variable loops that repeat at different rates. I'm not sure explicitly what you're trying to do, but I think I've done something that could apply.

    Creating a single loop in Excel is prettty simple. It actually does the work for you. Try this on a new workbook

    1. Enter "1" in A1
    2. Enter "=A1+1" in A2

    A3 will automatically be "=A2+1" as you drag down. The first steps don't have to be that explicit. Excel will automatically recognize the pattern and count if you just put "2" in A2, but if we want B1-B5 to be "100" and B5-B10 to be "200" (counting up the same way) you can see why knowing how to do it explicitly matters. In this scenario, You just enter:

    1. "100" in B1, drag through to B5 and
    2. "=B1+100" in B6

    B7 will automatically be "=B2+100" etc. as you drag down, so basically it increases every 5 rows infinitely. To make a loop of numbers 1-5 in column A:

    1. Enter "=A1" in cell A6. As you drag down, it will automatically be "=A2" in cell A7, etc. because of the way that Excel does things.

    So, now we have column A repeating numbers 1-5 while column B is increasing by 100 every 5 cells.You could make column B repeat, for instance, the numbers 100-900 in using the same method as you did with column A as a way to produce, for instance, each possible combination with multiple variables. Drag down the columns and they'll do it infinitely. I'm not explicitly addressing the scenario given, but if you follow the steps and understand them, the concept should give you an answer to the problem that involves adding more columns and concactinating or using them as your variables.

提交回复
热议问题