Wednesday 9 April 2014

To find the used range of the rows in Excel using VBA

To find the used range of the rows and columns:

Set VillageDataSheet = Worksheets("Water Point Data")
-> NumPoints = VillageDataSheet.UsedRange.Rows.Count
-> NumPoints = VillageDataSheet.Range("A" & VillageDataSheet.Rows.Count).End(xlUp).Row