I'm trying to display the value of a cell according to my ActiveCell or Target Cell using a Function. The cell I'm trying to display is in the same spreadsheet.
My objective is to create a Header in the spreadsheet that would display information according to the position of the Active cell.
I've tried this code and typed the function =VendorName5() in the cell where I want the value to be displayed but it seems to be missing something. Can you help ?
Function VendorName5() As String
Name = ActiveCell.Offset(0, -4)
VendorName5 = Name
End Function
OK, found it:
"Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 8 Then Range("C2") = Cells(Target.Row, 2) End If
End Sub"
tks for the help
VBA
, notVB.net
. – David Zemens=A1
in cell E1 – tigeravatarActiveCell
this should be fine using theWorksheet_Change ()
event. – David Zemens