

Well, this method is as same as using the Ctrl + Down Arrow in Excel to go to the last non-empty row. You can download this VBA Last Row Excel Template here – VBA Last Row Excel Template Example #1 – Using Range.End() Method How to Find Last used Row in Column Using VBA?īelow are the different examples with different methods to find the last used Row of a Column in Excel using VBA Code. In this article, I will introduce some methods which can be useful in finding out the last row for a given data set using VBA code. This is the reason a dynamic code which can take the last filled row into consideration makes it more important for us. Reason for the same is the range which we have updated under WorksheetFunction (which is B2:B11). Logically speaking, the above code will not sum up all the 14 rows from column B. Now, what if I add some cells to this data and run this code again?

Here, this code prints the sum of salaries for all employees (cell B2:B11) in cell D2. Range("D2").Value = WorksheetFunction.Sum(Range("B2:B11")) Suppose I have data as given below with employee and their salaries. Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.
