Excel VBA: Loop through cells inside the used range (For Each Collection Loop)




About this tutorial:

Video duration: 00:07:31
Get the complete course here:

In this video we do a mini project where we count the number of cells that contain formulas on our worksheet. We do this with Excel VBA with the help of the For Each Collection loop.

This allows us to loop through each cell inside the used range of the worksheet and check with the help of the IF statement whether or not we come across a formula cell. Here we use the HasFormula property of the range object. We then use a variable to keep this number in memory.

★★ Links to related videos:…

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads