Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default hlookup- move range by 2 rows with fill.

Ihave this formula:

=HLOOKUP('Hlookup table'!C2,'Hlookup table'!D2:O3,2)

as I scroll I would like the lookup value and the range to increment by 2,
so the next row would be:

=HLOOKUP('Hlookup table'!C4,'Hlookup table'!D4:O5,2),

the following offset formula returns the correct lookup value:

=OFFSET('Hlookup table'!C$2,(ROW()*2)-6,0)

Can i use the offset to move the range? I was try to solve a lookup problem
where i had problens sorting the data into ascending order and returning them
to their orginal position for other calculations.

Thanks

Stephen Christian
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default hlookup- move range by 2 rows with fill.

Hi,
if you want to drag right use this

=HLOOKUP(INDIRECT("'Hlookup table'!C" &
COLUMN(B2)+(COLUMN(A2)-1)),INDIRECT("'Hlookup table'!D" &
COLUMN(B2)+(COLUMN(A2)-1) & ":O" & COLUMN(B2)+(COLUMN(A2))),2)

or to drag down

=HLOOKUP(INDIRECT("'Hlookup table'!C" &
ROW(B2)+(ROW(A2))-2),INDIRECT("'Hlookup table'!D" & ROW(B2)+(ROW(A2))-2 &
":O" &ROW(B2)+(ROW(A2))-1),2)

Mike




"Stephen Christian" wrote:

Ihave this formula:

=HLOOKUP('Hlookup table'!C2,'Hlookup table'!D2:O3,2)

as I scroll I would like the lookup value and the range to increment by 2,
so the next row would be:

=HLOOKUP('Hlookup table'!C4,'Hlookup table'!D4:O5,2),

the following offset formula returns the correct lookup value:

=OFFSET('Hlookup table'!C$2,(ROW()*2)-6,0)

Can i use the offset to move the range? I was try to solve a lookup problem
where i had problens sorting the data into ascending order and returning them
to their orginal position for other calculations.

Thanks

Stephen Christian

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default hlookup- move range by 2 rows with fill.

So it looks like you want the first formula in B3 copied down, if so
try

=HLOOKUP(OFFSET('Hlookup table'!C$2,(ROWS(B$3:B3)-1)*2,0),OFFSET
('Hlookup table'!D$2:O$3,(ROWS(B$3:B3)-1)*2,0),2)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hlookup value within a range tywlam Excel Worksheet Functions 4 May 5th 09 04:24 AM
Hlookup-Drag to rows below Carolina Excel Discussion (Misc queries) 4 April 20th 09 08:47 PM
hLookup dynamic range Bongard Excel Discussion (Misc queries) 2 March 31st 09 01:43 PM
Using VLOOKUP or HLOOKUP to sum ROWS Max Excel Discussion (Misc queries) 0 August 4th 08 04:35 AM
How to fill in range of blank rows wth data fr last row previos ra Shinta Chen Excel Discussion (Misc queries) 1 September 11th 07 05:07 AM


All times are GMT +1. The time now is 04:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"