View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lorne[_2_] Lorne[_2_] is offline
external usenet poster
 
Posts: 44
Default Excel 2002: How to get the first and last reference in a column ?

"Mr. Low" wrote in message
...
Hi,

Let consider the table below:

A B
8
9
10 R216
11 R217
12 R218
13 R220
250 R368
500
1000

I need two formulas at cell A8 and B8 respectively to pick up the first
and
last refrence in column A.


As long as there are no gaps in the column you could write a macro and
either assign it to a button that has to be pressed or write it for the
sheet and execute every time there is a change to any cell in column A:

Sub Macro1()
Range("A9").Select
Selection.End(xlDown).Select
Selection.Copy
Range("A8").Select
ActiveSheet.Paste
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Range("B8").Select
ActiveSheet.Paste
End Sub

This assumes that the starting point is below cell A9 but not known.