Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2004-10-21
Medium Priority
Last Modified: 2010-05-02
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.


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

thanks a lot.

Question by:matthews_30
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 24

Expert Comment

ID: 12374890
Hi matthews_30,
try this:

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

LVL 24

Accepted Solution

R_Rajesh earned 300 total points
ID: 12374929
LVL 26

Expert Comment

ID: 12379679
ActiveSheet.Range("a1").SpecialCells(xlCellTypeLastCell).Column ' last cell on a column
ActiveSheet.Range("c1").SpecialCells(xlCellTypeLastCell).Row  ' last cell on c row

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question