Apologies, as I gave you a bum steer there and missed off a part of the
formula. Lets walk through so you understand what it's doing and then you
can see where I screwed up (Or you can just skip to the end and use the
amended formula).
In the formula you have, can you see that when you edit the formula, the
ranges actually pick up the right data in each table. The ranges don't have
to be the same dimensions in each table, although it shouldn't make any
difference if they are. The trick is to get one working formula on one of
your tables and then simply replicate it, but changing ranges, eg using the
example I gave you
I created 2 dummy tables of data, and then the first formula I created was
against the first dummy table of data I had
Table1 (Formula1)
INDEX($4:$17,MATCH(B2,$A$4:$A$17,0),MATCH(B1,$4:$4,0))
I then tried this with some sample data that I knew was in that first table
and made sure that it did return the values I expected. By clicking into
the formula you should see the ranges on the sheet itself highlighted, and
that just gives you a indication that your formula is looking at the right
places. Once you have this working, copy the formula and paste it into
another cell, and then edit the formula such that it now looks at your
second table instead of the first.
Table2 (Formula2)
INDEX($20:$33,MATCH(B2,$A$20:$A$33,0),MATCH(B1,$20:$20,0))
Once again try it with dummy data that you know is in your second table and
ensure that it does actually return the values you expect.
Now what you need to do is simply combine the two, and the logic you are
going to apply is as follows (and this simple bit is where I screwed up)
I had told you
=IF(ISNA(Formula1),Formula2)
whereas in fact it should have been
=IF(ISNA(Formula1),Formula2,Formula1)
based on =IF(Condition, If_True_Do_This,If_False_Do_This) with Condition
being whether formula1 produces an #N/A error or not.
This says that if formula one produces a result, the ISNA(...) evaluates to
FALSE, so the IF formula will go to the If_False_Do_This bit. If formula1
produces an error because it is not in that table, then the IF formula will
go to the If_True_Do_This bit.
You now just combine the formulas as per the example, such that
=IF(ISNA(Formula1),Formula2,Formula1) becomes
=IF(ISNA(INDEX($4:$17,MATCH(B2,$A$4:$A$17,0),MATCH(B1,$4:$4,0))),INDEX($20:$
33,MATCH(B2,$A$20:$A$33,0),MATCH(B1,$20:$20,0)),INDEX($4:$17,MATCH(B2,$A$4:$
A$17,0),MATCH(B1,$4:$4,0)))
Sorry if a bit long winded, but I think it helps to know what it is actually
doing, and apologies for the bum steer in the first place.