ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   activecell & Vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/61578-activecell-vlookup.html)

flow23

activecell & Vlookup
 
Is there a way to rewrite a vlookup based on activecell?

=VLOOKUP("activecell",Sheet1!A:B,2,FALSE)
where in it picks up value from the active cell?



pinmaster

activecell & Vlookup
 

Right click on your worksheet and put something like this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1") = ActiveCell.Value
End Sub

change A1 to any blank cell and refer to that cell in your formula.

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=495494



All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com