How to find the last entry in a column of numbers

J

John

I have a column of numbers, to which I add new number at the bottom of
the column, each day.

I want to identify and extract the last entry in that specific column
(not the entire spreadsheet) and insert it into another cell, not in the
column, but on that same spreadsheet.

Been trying to figure out how to do this for several hours, and have not
been able find an answer.

TIA for any ideas on how to do this.

John
(Palm Harbor, FL)
 
G

Geoff Lilley

This ought to get it done. The assumptions here are that A is the
column that has the data, and G1 is the cell into which you want to put
the new value.

HTH.

Cheers,
Geoff Lilley
Microsoft Office Master Instructor (2000/XP)
Apple Certified HelpDesk Specialist

Sub findLast()
Dim strValue As String
Range("A1").Select
Do Until ActiveCell.Formula = ""
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Offset(-1, 0).Activate
strValue = ActiveCell.Formula
Range("g1").Select
ActiveCell.Value = strValue
End Sub
 
J

John

Geoff,

Thanks!

Even though I know practically nothing about macros or visual basic, I
manage to guess where to paste your solution, and it worked the first time.

Yippee!

john

*************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top