HOW TO FIND last cell from activecell?

C

CAPTGNVR

DEAR ALL

Excel97: in COL A, have say 50 rows 1 to 50. Again have row 70 to 150
another seiral numbers 1 to 80.

Suppose if cell A25 is clicked, how to use countA to find the last cell in
row 1 to 50.

Pls bear in mind that xlup etc cant be used bcos from row 70, i have another
serial numbers.

Pls sugest what VB. Thnks
 
G

Gary''s Student

Sub findit()
j = ActiveCell.Row + 1
ad = "no data found below the active cell"
For i = j To 50
If IsEmpty(Cells(i, 1).Value) Then
Else
ad = Cells(i, 1).Address
End If
Next
MsgBox (ad)
End Sub
 
P

Per Jessen

Hi

Using xlDown will move to the last downmost cell in the serie.

LastCell = ActiveCell.End(xlDown).Address

Regards,

Per
 
C

CAPTGNVR

Dear MARK IVEY, GARY"S STUDENT AND PER JESSEN,
I DONT KNOW WHY MY RESPONSE TO MR. MARK SAYING THAT VB line worked did not
get posted. However pls accept my thanks for helping me out. How i wish if
you all could also help me for my previous thread why in one particular sheet
I dont get to see the edit-fill"series" option highlighted in excel 97.
Whereas in any other worksheet this option for "series" is highlighted and
available. Pls dont say i shud not mix two threads but somehow this nagging
one going on for last one year and no one is answering including todays
posting.
 
M

Mark Ivey

Just read over your other post....

I may not be much help because I have not used Excel 97 in quite some
time...

But either way I would like to see if I can help at all.

Can you send me a copy of the workbook with detailed instructions on exactly
what you are trying to accomplish?

From there I will see if I can help out further or see if I can find the
problem.

My email is: wmivey6311 AT hotmail DOT com (AT = @, and DOT = ".") I use
this format to prevent SPAM.

Mark
 

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