0
votes

I am looking to pull the value from the left cell of the cell I selected. I have done the following: step1) Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub

step2)
I am currently using this formula: =cell("contents") to show the value of the cell i selected.

step3) Now I need to pull the value to left of the cell i selected. How can i accomplish this? I am stuck.Is it possible to merge =cell("contents") with =RC[-1]????

all i need is the cell value to the left of the cell I selected? Any suggestions?

1
The cell to the left of the selected cell is Selection.Offset(0,-1)Gary's Student
yup, using offset will do this for you.Wookies-Will-Code

1 Answers

0
votes

in 2010:

    activecell.offset(columnoffset:=-1).value 

should get it.

For example this shows the value of B6

    Range("C6").Select
    MsgBox (ActiveCell.Offset(columnoffset:=-1).Value)