in VB how to know the last record of an excel spreadsheet?

i have an spreadsheet that has 3 columns and the data in every field is populated every month, so always the amount of data may varies.

for example, some months i can have from cell a1 to cell c32, and in other months i can have from cell a1 to cell c43

i need to know the final cell, in this example, c43.

additional.

i always have 3 columns, A, B and C.

thanks a lot.

matt
matthews_30Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
R_RajeshConnect With a Mentor Commented:
0
 
R_RajeshCommented:
Hi matthews_30,
try this:

Range("C65536").End(xlUp).Address(0, 0)

Rajesh
0
 
EDDYKTCommented:
ActiveSheet.Range("a1").SpecialCells(xlCellTypeLastCell).Column ' last cell on a column
ActiveSheet.Range("c1").SpecialCells(xlCellTypeLastCell).Row  ' last cell on c row
0
All Courses

From novice to tech pro — start learning today.