Here's a workbook with the refreshing of the Owners sheet working "properly".
Apart from not copying the Owner data when a second property is held, also the Owner/Property combination got mixed up.
That's because the ownerPropLog holds duplicate Owner Id's when more than one property is held. And the copying
depends on the data in OwnerLog being in the same order as in OwnerPropLog, which with duplicates will never be the case.
It's now only is copying the Owner Id's from the OwnerPropLog sheet into the Owners sheet.
The other columns are filled with lookup formulas looking up the data based on the Owner Id's. This to avoid the mixing up
of Owner/Property combination when owner hold more than one property.
However, going through your workbook it's clear that it is still very sensitive to changes.
That is mainly caused by many hard coded cell and range references.
That can be dealt with of course, but in the way your workbook is set up, that would take a lot of coding.
I would strongly recommend you to reconsider the setup and make the following changes:
- Basically the core of your application needs 3 tables: - One to hold the Owner data
- One to hold the Property data
- One to hold the Owner/Property combinations
In the current workbook the Owner/Property combinations are spread over two tables (Owners and OwnerPropLog) and these need to
be synchronized permanently. Integrating these two tables into one would render this need for synchronization obsolete.
Apart from these to 3 tables you can of course have additional tables for logging changes made by users, data validation etc etc
- You're spending a lot of code keeping track of range dimensions and finding where a range ends to insert new data.Using Excel tables would make that a lot easier, because Excel would do all that for you.
I'm aware that this is just a lot of text. I'll try to make up a sample workbook the demonstrate what I mean.
Bookmarks