Solved

HLOOKUP in Excel- increment row_index_num

Posted on 2011-03-17
6
1,260 Views
Last Modified: 2012-05-11
Hi Experts,

I have a HLOOKUP formula:
=HLOOKUP(QR5,$B$3:$QO$5000,2) where 2 is the row_index_num

I need to be able to increment that row index num by 1 each when the formula is copied to the next row. I tried using a simple counter and referencing that row_index_num to the cell containing the counter, but returned an error message (#VALUE)

Any help appreciated...
Kevin
0
Comment
Question by:KevinHatt
6 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 500 total points
ID: 35156747
Try like this:

=HLOOKUP(QR5,$B$3:$QO$5000,ROW(A2))

jppinto
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35156847
ROW(A2) will give the row number 2. When you copy this formula to the next row, it will change to ROW(A3) thus giving you the row number of 3, and so on...
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 35156855
You can also use the ROW function with no reference which will return the row on which the formula is being used, then plus or minus a number to adjust if necessary.

For example if the above formula from jppinto was on row 2 there would be no need for an adjustment but if it is on row 5 it would be:

=HLOOKUP(QR5,$B$3:$QO$5000,ROW()-3)

Cheers
Rob h

0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35156984
Is the formula in the next row supposed to be:
=HLOOKUP(QR5,$B$3:$QO$5000,3)
or:
=HLOOKUP(QR6,$B$3:$QO$5000,3)
?

0
 

Author Closing Comment

by:KevinHatt
ID: 35157019
Hi jppinto...thanks for the prompt help
Full points and gratitude :-)
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35157104
Glad I could help!

Thanks for the grade and the kind words.

jppinto
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question