简体   繁体   中英

Using a Drop Down Selection, need to return rows of data if drop down selections match in Excel

Using Excel only (as I have no access to anything else), I have a table of data which includes the following;

Faculty/Course/Class/Teacher and then a breakdown of exam results.

what I've been asked to make is a page where the user can use drop down boxes which will then return all the rows that match the drop down selections.

this could either be specific so using Faculty/Course/Teacher or just faculty etc.

Is this possible? I'm handy with Vlookups, but not when it comes to multiple lookup values.

File hosted on dropbox if it helps?

https://www.dropbox.com/sh/gzjx0htts17p7yn/AAAIec6KaG9S8UXXsru8hU0oa?dl=0

I have a method you could try (bearing in mind it does need the lookup column in your data sheet to be sorted). In your second - lookup sheet, you will need to use the first column as an indexing helper column.

For my test data - I entered 10 rows for the test to begin:

In A3 I added this formula - =MATCH($A$1,Data!$A$1:$A$17,0) (adjust accordingly) which is merely used to locate the first instance of your validated value (I put it in A1). This will return its row number.

Below I added 9 iterative numbers that add onto that value - so if it returned 2, the row below would be 3, then 4 and so on.

Then in B3 I added an index formula =IF(ISERROR(IF(INDEX(Data!$A$1:$A$17,Test!A3,1)<>$A$1,"",INDEX(Data!$A$1:$A$17,Test!A3,1))),"",IF(INDEX(Data!$A$1:$A$17,Test!A3,1)<>$A$1,"",INDEX(Data!$A$1:$A$17,Test!A3,1)))

I know this looks fairly grim, but all its doing is checking if returning the index - based upon the value in A3, matches your lookup value and also whether there is an error (which could happen for the bottom rows of your data sheet)

This will then return the value in the first column. For subsquent columns - you could use =IF($B$3<>"",INDEX(Data!$A$1:$E$17,Test!$A3,COLUMN(B1)))

I hope that gets you on the right track.

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