Hello!
This is my first thread on the forum.
I'm working as an architectural engineer and I have been assigned to a task where I have to make +150 reports on some old ventilations aggregats.
For that I would of course want to standardize and automate the proces, so I can gather all informations in one excel workbook (in case of changes in the standard text or calculations).
The ventilationaggregats is placed on different schools, and therefore I have made a drop down list with the school names.
Depending on which school you choose you get another drop down list with the relevant ventilation aggregats (=agg.) for that exact school.
Each school have a table and these table are named equal to the drop down list of the schools.
In the table for each school is rows equal to ventilationsaggregats on the schools, where the first coloumn contains the name of the agg. (the drop down listes for agg. is bound up to this coloumn for each table).
The next coloumns contains the values for each agg. which I will have to use for some calculations and the standard text. These calculations I would like to change each time a new school and agg. is choosen.
Each table contains a header for each information/value on the ventilationsaggregat and each table have the same headers.
I first made the command in excel for a test. The formula in the cell where I wanted my value to be insterted is: INDEX(Schoolname[HEADER_VALUE], MATCH(agg.name, Schoolname[HEADER_AGG], 0))
(Note: in the real formula it is a specific school and agg., but for simplicity I wrote it as a general formula here)
It worked, but that command was also "static" and not "dynamic".
I then tried to write this in VBA and make it dynamic by referring to the cell valus in the dropdown two drop down listes, so I, by these two cells values, could refer to the relevant tables for each school.
When I run the formula I just get the N/A in the cell where I was supposed to get a value.
The code looks like this:
What am I missing? I would really appreciate some help, because I can't figure it out or google an answer with this one.Please Login or Register to view this content.
I'm not a programmer, I just use it a bit as a hobby and a working tool, so it's most likely pretty basic.
Bookmarks