Getting active/selected cell in to a reference cell

Tipx76

New Member
Joined
Oct 26, 2015
Messages
3
Hi.
In my work I work a lot whit codes, Sometimes in multiple columns. but it’s hard to always know the code description.

To get a clean excel sheet, I’d like to select a cell whit arrow keys ore mouse in these columns of codes and that the selected value is always displayed in a reference cell in the top.

The Idea is to have that cell as a value for a Vlookup to display the description of the current selected code.

Let’s say that reference cell is E2 and the V lookup is found in F2, As I change the selected cell whit mouse or arrows E2 is changing to the current value and is the search value for F2.

Can this be created whit excel functions or is a VB script needed. If so how do I do it?
This should be a quite easy task but no one I’ve talked to have a solution. hoping for a better help in this forum.


Br Fredrik
 
Let me see if I understand what your saying.

Basically you want to be able to select (click or arrow to) any cell on your spreadsheet, and in another cell, have the formula of that cell as the search criteria for Vlookup?

In other words you want a cell with the formula: "=Vlookup(selected cell formula, Range, Column Index, True/False)"


If that is what you are looking for I think it can be achieved with VBA and look "clean" as you say.
Let me know if I understood correctly, and I can help with the code.
 
Upvote 0
Let me see if I understand what your saying.

Basically you want to be able to select (click or arrow to) any cell on your spreadsheet, and in another cell, have the formula of that cell as the search criteria for Vlookup?

In other words you want a cell with the formula: "=Vlookup(selected cell formula, Range, Column Index, True/False)"


If that is what you are looking for I think it can be achieved with VBA and look "clean" as you say.
Let me know if I understood correctly, and I can help with the code.

Basically id like the value in one cell and then use that to feed a vlook up in a other cell nex to it.
Just to make it Easy and easy to use. Even if combining the two might be a bit cleaner.
E1 = Selected cell and in F1 have the Vlookup(E1,range,column index,false)

Br Fredrik
 
Upvote 0
Basically id like the value in one cell and then use that to feed a vlook up in a other cell nex to it.
Just to make it Easy and easy to use. Even if combining the two might be a bit cleaner.
E1 = Selected cell and in F1 have the Vlookup(E1,range,column index,false)

Br Fredrik

Okay, I am feeling kind of thick for not understanding yet, but let me see if we are close with an example.


The formula I have in cell F1 is =VLOOKUP(E1,A1:B9,2,FALSE)
And here is what I get:

Code:
[TABLE="width: 490"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Horse[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Cat[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Dog[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Fly[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Cat[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Pig[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Bear[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Wolf[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Fish[/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Human[/TD]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Is this essentially what you are looking for?

Or,

Do you want to be able to click on the cell containing Wolf, have Wolf show up in Cell E1, and VLookup Return 7
 
Upvote 0

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