简体   繁体   中英

Excel INDEX isn't working with Table reference

I am using Excel from Office 2010. I am trying to get values from a specific row (or, eventually, rows) in the table, found by running a search. I can successfully identify the row in the table that I want to output the data from, but the INDEX function is not working when I tell it to go get that row from the database.

=INDEX(OutputTable[Department];$F2)

is giving me an error, as is:

=INDEX(OutputTable;$F2;COLUMN(OutputTable[Department]))

Everything I can google tells me that one or the other of these should work, but Excel keeps giving me an error, telling me that the problem is with the first argument of INDEX: The reference to OutputTable. I've typed it in manually, and I've navigated to it to select it directly. $F2 holds the successfully calculated row number from the search.

Why would it tell me that this is erroring? I can't even figure out where to look.

EDIT

=INDEX(Output!$A$2:$A$30;$F2)

On an impulse, I went ahead and tried using a simple $A$2:$A$30 reference instead of OutputTable[Department] . It still errors out, telling me that $A$30 is the problem. (not the whole reference. Just that.) So now I'm even more confused.

Are you sure that you should be using a ; as opposed to a , ? I get an error for that, and it directs me to $A$30 as you stated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM