If Active cell is in column F then..

omairhe

Well-known Member
Joined
Mar 26, 2009
Messages
2,040
Office Version
  1. 2019
Platform
  1. Windows
Hey Excel Gurus,

I want your help to find the value of the adjacent cell on the left when the selection or the active cell is residing in column F.
For instance the data is

Column EColumn F
ABCSTU
DEFVWX
GHIYZ0
JKL123
MNO456
PQR789

When Selection is F1 then output in A1 = ABC
Selection is F2 , A1 = DEF
Selection is F3, A1 = GHI
Selection is F6, A1 = PQR

The A1 is linked to a UDF which filters out data in column C.

Hope it is clear what is needed here.
As always will appreciate, and thanks many.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Sounds like a SelectionChange code:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Column = 6 Then Range("A1").Value = ActiveCell.Offset(, -1).Value
End Sub
 
Upvote 0
Sounds like a SelectionChange code:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Column = 6 Then Range("A1").Value = ActiveCell.Offset(, -1).Value
End Sub
Thank you RoryA
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,793
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top