Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How do I translate the Long returned by loc_1 and lcol into something the vlookup formula will accept? On my test sheet they are 4 & 5 with current data. Thanks, Howard Option Explicit Sub Vx_x() Dim lcol As Long Dim lcol_1 As Long lcol_1 = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column - 1 lcol = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column MsgBox lcol_1 & " " & lcol Range("G12").Formula = "=vlookup(F12,lcol_1:lcol,2,0)" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup with variable | Excel Programming | |||
Vlookup using a variable for the workbook name | Excel Discussion (Misc queries) | |||
vlookup with a variable | Excel Programming | |||
vlookup using a variable | Excel Programming | |||
variable vlookup | Excel Programming |