Finding the Last Row in Excel using Excel VBA

In excel there are situations where we need to find last row of an sheet. This can achieved by defining a variable and assigning the last row value to the variable and using offset property to find the last row.

Method 1: Declaring the variable and assigning the last row to the variable.
Eg:
Dim FinRow   ‘Finrow is variable which hold the value of last row.
Finrow=Range(“A65536”).End(x1Up).Row
Now Finrow variable contains the last row number in Column “A”

Now if you want to put total in the last row of Column “A” then use
Range(“A”&Finrow+1).Value=”Total”

(Visited 123 times, 1 visits today)

Meet the Author

Hi, I am Aniruddha, an avid blogger since 2008 who likes writing about new gadgets, smartphones and excel. You can find them at www.tech2touch.com. You can also follow me on Twitter @tech2touch or my Facebook page tech2touch. You can subscribe to my YouTube channel tech2touch. Enjoy reading and watching!!!

0 comments… add one

Leave a Comment

Shares