Fill cell A with data from cell B by clicking cell C

rfinnegan

Board Regular
Joined
Mar 15, 2005
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All:

I'm stumped on this. Please help -

I want to click on cell H13 and have the info from W13 appear in O7. Or click I13 and have the info from X13 appear in O7, etc... (O7 will simply be set with a barcode font).

Thanks in advance.
 

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
Perhaps this code might help. Paste it in to the code module for the worksheet you want it to run on, and change the 'Clickable Range' as you see fit.
Code:
Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Dim clickableRange      As Range
    Set clickableRange = Range("H:I")       'edit this as you see fit
    
    If Not Intersect(Target, clickableRange) Is Nothing And Target.Cells.Count = 1 Then
        Target.Offset(0, 15).Value = Range("O7").Value
    End If
    
End Sub

Hope that helps.

/AJ
 
Upvote 0
Thanks Adam. It didn't quite work, but I managed to steal some of it and add it to a different piece of code I had.

Here was the final result -

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address <> "" Then Range("o7").Value = Target.Offset(0, 15)
End Sub

thanks again
 
Upvote 0
Oh yeah. Might have helped if I'd read the question thoroughly. Glad it helped though, thanks for the feedback :)

/AJ
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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