![]() |
Identifying value in a cell knowing R1C1 naming
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 |
Identifying value in a cell knowing R1C1 naming
Check your previous thread.
Barb Reinhardt wrote: 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 -- Dave Peterson |
Identifying value in a cell knowing R1C1 naming
How about
Dim MyValue MyValue = Cells(Target.Row, Target.Column).Value Barb Reinhardt wrote: 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 |
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 |
All times are GMT +1. The time now is 05:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com