Last Cell

P

PeterLai

I want to assign the value of A1 = the last cell of col B which is changing
when a new entry is added.
How can I do it but writing simple programme.
 
F

Frank Kabel

Hi
if you don't have blank rows in between you may try the
following formula in A1
=OFFSET($B$1,COUNTA(B:B)-1,0)
 
M

Melanie Breden

Hi Peter,
I want to assign the value of A1 = the last cell of col B which is changing
when a new entry is added.
How can I do it but writing simple programme.

put the following procedure in the code module of the sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
Application.EnableEvents = False
Range("A1").Value = Target.Value
Application.EnableEvents = True
End Sub

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)
 
Top