View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pcor[_2_] pcor[_2_] is offline
external usenet poster
 
Posts: 9
Default Calling a function from within EXCEL

Hi
How do I CALL the function below.
Where do I place the code shown below
And how do I go about calling the function
Thanks

Sub FindLastCell()
Dim LastCell As Range
With ActiveSheet
Set LastCell = .Cells(.Rows.Count, "A").End(xlUp)
If IsEmpty(LastCell) Then
'do nothing
Else
Set LastCell = LastCell.Offset(1, 0)
End If
End With
MsgBox LastCell.Row
End Sub


--
Norton Virus checker 2003 says this email is clean