# Data Index

#### cwigelsw

##### New Member
I have having trouble designing an index formula, I have the table and the data setup but cannot get the criteria correct. The biggest problem that I can see is that the lookup criteria for both columns and rows would be constantly changing.

I have tried inserting V and H look ups but keep getting a#Ref error

below is the formula I am trying. The data table is in B7 through S24 with column A and Row 6 being the headers that need to be the look up values.

=INDEX(Sheet2!\$A\$6:\$S\$24,(VLOOKUP(D5,Sheet2!\$A\$6:\$A\$24,1,TRUE)),(HLOOKUP(G5,Sheet2!\$A\$6:\$S\$6,1,TRUE)))

any help will be appreciated.

##### Well-known Member
=INDEX(Sheet2!\$A\$6:\$S\$24,(VLOOKUP(D5,Sheet2!\$A\$6:\$A\$24,1,TRUE)),(HLOOKUP(G5,Sheet2!\$A\$6:\$S\$6,1,TRUE)))

any help will be appreciated.
Are you sure your understanding the Index formula? Your looking up a grid for the first argument
INDEX(Sheet2!\$A\$6:\$S\$24
and you'll be referencing a grid like this, you'rs will be bigger due to space constraints

Excel Workbook
ABCDEFGH
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 Sheet3

Your second argument will be to select a Row number, which can be done by either a hardcoded input or via a formula that will evaluate to a number which can then be referenced. It's quite often if your setting up like you have then you would the Match Function to find the Row reference and the Column Reference. In the sample, if you wanted to index to return how much a salesman returned on a certain day, you would use index to create a matrix of the cash returns like this then match to first select the ordinal Row position and similar to select the weekdays position also

Excel Workbook
ABCDEFGH
3SalesmanWeekdayReturns
4eveTuesday
5
6MondayTuesdayWednesdayThursdayFridaySaturdaySunday
7Tom635.00174.00434.00706.0093.00684.00722.00
8sal130.00160.00208.00262.00464.00613.00629.00
9eve666.00376.00663.00499.00624.00718.00292.00
10matty562.00370.00490.0068.00143.00654.00546.00
11robert329.0081.00479.00108.00530.00490.00387.00
12callumn635.00611.00348.00242.00233.00392.00727.00
13eddie626.00239.00604.00332.00107.00146.00645.00
14marion433.0072.00337.00109.00456.00158.00422.00
15shirley67.00366.00614.00284.00351.00499.0070.00
16stewart515.00111.00652.00218.00145.00104.00336.00
17simmone152.00386.00657.00451.00714.00334.00123.00
18stephen388.00257.00193.00135.00122.00236.00444.00
19walter605.00460.00122.00701.00352.00475.00743.00
20wendy103.00288.00203.00482.00285.00577.00748.00
21siobahn96.00179.00438.00559.00351.00431.00242.00
22derek359.00558.00133.00286.0092.00643.00648.00
23pauline651.00621.0079.00428.00433.00287.00229.00
24willie78.00136.00370.00470.0087.00494.00495.00
 Sheet3

1,081,862
Messages
5,361,740
Members
400,653
Latest member

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...