View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chuka Chuka is offline
external usenet poster
 
Posts: 2
Default HLOOKUP using variable columns

Thanks for your timely response. Yes the row varies based upon the date.
How do I write a formula for a variable row? Sorry I think I got my VLOOKUP
& HLOOKUP mixed. When I attempted to reference a cell
=HLOOKUP(B3,$B$6:$D$7,?,FALSE) I had trouble. Any ideas how to correct this
without including a whole number for the row?

"Bernard Liengme" wrote:

I am confused! You are using HLOOKUP but talk about a variable COLUMN
Is this a VLOOKUP or is it the ROW that varies?
It is perfectly OK to use a cell reference rather than a number literal in
the syntax of either function
I would help if we had a better idea of the actual data.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Chuka" wrote in message
...
I'm trying to reference a variable column rather than a specific column #
in
my HLOOKUP formula.


A1 B1 C1 D1
A2 1/6/2009 Today's Date
A3 1/6/2009 Start Date
A4
A5 1/5/2009 1/6/2009
A6 1/5/2009 1 0
A7 1/6/2009 2 1


I would write my formula as =HLOOKUP(B3,$B$6:$D$7,?,FALSE) In place of
the
? I've tried to reference a cell that contained a whole number but that
didnt
work. I want to be able to copy and paste this formula for several
different
individuals based upon their starting date & not necess. column D every
time.
Any ideas here? Please use literal interpretation
(A6=A6,B6=1/6/2009,C6=2).