View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Identifying value in a cell knowing R1C1 naming

Barb,

Target.Offset(0,1).Value

is the value to the right of the changed cell (unless target is multicell, in which case this will
blow up....)

myVal = Application.VLookup(Target.Offset(0,1).Value,Range ("A1:B100"),2,False)

will use that value in a VLookup....

HTH,
Bernie
MS Excel MVP


"Barb Reinhardt" wrote in message
...
I am using a worksheet change event and am getting row and column data from
the target value. What I want to do is get the value that is in the
following location and ultimately use it in A VLOOKUP. What am I doing
wrong?

Set Value.address = "R" & Target.Row & "C" & (Target.Column + 1))

This value will be used as a constant in an

Application.WorksheetFunction.VLookup() function