Hello there, I've been reader for awhile, finally joining up with a question!
Layout of my question:
3 tables:
Table 1(account number): List of account numbers I wish to play with, around 3,000.
Table 2(date): List of occurrences, around 3,000
Table 3(date): List of occurrences accounted for, some values are useless, around 4,500
I'd like to find the list of occurrences not accounted for, but here's my problem, the
date for this in Table 2 and Table 3 are not the same and are generally days up to a
month and a half apart, and some occurrences accounted for don't have corresponding
occurrences in Table 1 it's impossible to be 100% correct with these, but right now
just counting vs. the tables only yields about 65% correct, and those are generally the
easy ones, such as no occurrences and 1 occurrence. By hand, I'd say it's correct
probably around 97% of the time using the logic of matching occurrence.
I'd like to do something like...
FUNCTION1:
"
FOR Table1(AcctNum):
FOR Table2(date)
IF(AND(Table2(date(accountedfor)!=TRUE, Table3(date(accountedfor))!=TRUE),
IF(Table2(date) - Table3(date))<46, add TRUE to AND(Table2(date(accountedfor)),
Table2(date(accountedfor))) 0)
"
FUNCTION2:
"
FOR Table1(AcctNum):
FOR Table2(date(accountedfor))
IF Table2(date(accountedfor))==TRUE, Table1(AcctNum(count))=+1
I understand this would have an issue if marking TRUE something off of either table
before checking all instances incase they can all be accounted for incase an item in
table1 and can linked to 2 different items in the table2 but another item can only be
linked for 1 and the first item, "takes the slot". But I'd like to try this method out,
it seems like the most conservative and that's okay.
Any ideas of if there's an easy or better way to do this?
I just know a bit of excel and a little python, which doesn't really help me much.
Thanks so much, I look forward to learning this here stuff down good and hopefully be
one to answer questions in time.