Learn much more about loops >. Once we have the logic correct, we will apply the logic to a range of cells using a looping structure.In Excel, open the VBA Editor by pressing F-11 (or press the Visual Basic button on the Developer ribbon. Sub DoUntilDemo() Do Until IsEmpty(ActiveCell.value) ActiveCell.value = ActiveCell.value * 2 ActiveCell.offset(1, 0).Select Loop End Sub Related examples in the same category 1. We will give you easy examples to understand the loop. Range: Select the range that captures the cells in which you want to select the cells with a specific value by changing the range reference ("B3:C9") in the VBA code. The next thing you have is the equals sign and then the value which you want to enter (you need to use double quotation marks if you are entering a text value).