Site icon Best Excel Tutorial

How to loop without VBA or macros?

Looping is a common task in Excel, and it can be done using VBA or macros. However, there are also ways to loop in Excel without using VBA or macros.

We will show you how to loop in Excel using the IF function and the INDEX function.

It is very common to create the required loops in Excel vba like if loop, do while loop, do until loop, for loop, while wend loop for different purposes.

But here we will create a similar effect in Excel using formulas.

Excel loop formula

In any Excel file, name one sheet as ‘testsheet’ and another as ‘result sheet.’ In cell A1 of ‘result sheet,’ write the formula:

=IF(‘testsheet’!C1 <= 99,’testsheet’!A1,””)

Copy this until row 40.

Now in cell B1 write formula: =A1

Now in cell B2 write: =B1 & A2

Looping in Excel without Vba code

Copy this till B40. We will get the following results:

It worked the same as for loop in but without Vba code involved.

Exit mobile version