Thread: Vlookup help
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Vlookup help

Shelly

=VLOOKUP(cellref,table,Column(E:E),FALSE) should also work.

No need for the UDF


Gord

On Thu, 22 Dec 2005 12:27:12 -0800, Gord Dibben <gorddibbATshawDOTca wrote:

Shelly

Copy/paste this UDF to a General module in your workbook.

Function GetColNum(myColumn As String) As Integer
GetColNum = Columns(myColumn & ":" & myColumn).Column
End Function

Then your vlookup formula as such.........

=VLOOKUP(cellref,table,GetColNum("e"),FALSE)


Gord Dibben Excel MVP


On Thu, 22 Dec 2005 11:18:41 -0600, shelly2
wrote:


Thank you David. That might be the best solution.

My lookup value isn't always column A. What I was hoping for was
something like =column AB-column D. Now I know that won't work but is
there something that will work?

Thanks again,
Shelly