I currently have a drop down menu on my spreadsheet which allows the user to select from a range of computer parts such as "MotherBoard", "CPU" ect... Depending on what was selected in the drop down list the headings in my table change to suit the computer part selected. So if motherboard is selected all of the data about the motherboard appears in the table and the headings change to that of a motherboard e.g. "Supported Memory", "Sound Card" .... To do this i have had to use this code so that the heading do change to suit the part selected in the drop down list.
=IF($A$1="Motherboard",Stock!G1,IF($A$1="CPU",Stock!AC1,IF($A$1="GPU",Stock!S1,0)))
Cell A1 is where the drop down list is located on my table. Stock! is refering to my stock sheet which has all of the heading for each part and the data that come with it. I will include a copy of my prototype so that helping me will be made easier.
Stock Table Prototype.xlsx
This code was made to work with only 3 computer parts as a prototype so i could make sure it worked. I will have over 10 computer parts available to be selected from the drop down list when i create the actual stock table. This would mean i would need over 10 IF statements for it to work. I was wondering if there is a way of shorting on even changing the code if possible so that i wouldn't have to keep on writing IF statements in order for it to work. Thank you for any solutions and input.
Bookmarks