I'm thinking you are better with the tables on another sheet and have one 'input' sheet which will give you the results.
Effectively like a database, with a front end and a back end.

Apologies Skreech, I thought this one was going to be easy until I re-read your outline of the logic you wanted to be incorporated. Taking longer than I thought and I'm also learning too!

Get back to you when I get something working.

Cheers,
Tony