Hi everyone,
even though I somewhat feel I am raping Excel into doing something it was not intended to ever be doing here is what I am trying to achieve:
I want to create a report(-like worksheet) that is populated with data from three different tables looking like this
Problem_Table
PB_id | PB_Descr
pb1 | baad
pb2 | really bad
pb3 | not that bad
Project_Table
P_id | P_Descr
p1 | make everthing better
p2 | optimization
p3 | relax
Matching
PB_id | P_id
pb1 | p1
pb1 | p2
pb2 | p1
pb2 | p3
pb3 | p3
So one problem can have multiple "solving" projects while at the same time a project can tackle multiple problems.
What I guess I could do is to write a VBA looking somewhat like this
foreach pb in problem_table
copy_over(problem_table.pb, problem_table.descr)
foreach matching.pb in matching
if matching.pb = problem_table.pb then
foreach project_table.p in project_table
if matching.p = project_table.p then
copy_over(project_table.p, project_table.descr)
end if
next
end if
next
next
(this is not actual vba code as you might notice, but it should come close to it ;-) )
The problem with this is...
1) that it's ugly
2) that I am afraid my pc will explode while calculation (aka its slow)
3) that whenever some extension of this is needed I am the only one who can fix it (ew)
Is there any SMART way to get a report with such a N:M relationship with three tables?
Thank you so much for your help!
Best regards,
Andreas
Bookmarks