Click event theory

PHxLantern

New Member
Joined
Apr 13, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello there,

I tried to ask a very complicated question not to long ago, and I may have screwed up what I was trying to figure out.
So here goes a second try in a different way.
My question is such.
Can you click on a cell populated with let's say a word or basic string of numbers (like a part number for a product) and have data pulled from another cell that otherwise matches the cell you clicked on, and pastes it in an empty cell?
So for example I have A2 and B2 populated, I click on either. It the pulls data or a text string from, say, H2 and pastes it directly to D2. And if I go down further down the list and click on say B14 it grabs and pastes from h14 to D3, so on and so forth.
I cant use a drop down list since the amount of items I have is large and makes it hard to read.
Any help on this question is appreciated.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
In the Sheet level module there is the following macro selection for double-clicking :

VBA Code:
Option Explicit

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

End Sub

You can create a macro within it that searches for the data you mentioned ... and if located, it copies and pastes that data into the cell desired.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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