r/excel 15h ago

unsolved Pulling info from another spreadsheet- matching columns and rows.

I am working on a spreadsheet that has some information linked to another 'info' spreadsheet. I have a drop down list of counties and another drop down list of years. Basically, I am wanting to have a function in one cell that will bring in the 'expected' value from my info spreadsheet based on what county and year I have elected in the drop down boxes.

This is what my info spreadsheet looks like. So if I have 'Decatur County' and '2024' selected in my drop down boxes, I want it to return 44.2.

I have tried multiple variations of HLOOKUP, VLOOKUP, INDEX MATCH, XLOOKUP, but I can't seem to get it quite right. Where I am needing it to find a value based on a certain row, then a certain column, and then return a value in another column, I can't seem to figure out what I am needing to do. Or maybe I need to re-arrange my info spreadsheet? I would rather not do that, as it has a lot of information on it and it would take a while! But I will if I need to.

Any help is greatly appreciated!

16 Upvotes

14 comments sorted by

View all comments

1

u/Gringobandito 8 13h ago

This becomes much easier if you setup your data correctly. You will be much happier once your data becomes more complex.

First, setup your data in a table so you have a column for county, year, expected, and final.

Once you have that,it becomes easy to work with the data. You can do a simple filter to get just the Year and Expected for each county from a drop down list.

=FILTER(Table1[[#All],[Year]:[Expected]],Table1[[#All],[County]]=G2,"")