I have a very complex spreadsheet and I've encountered a problem I can't find a solution to..

Here is a snippet with my problem:

A1     A2     A3          A20     A21
50     200    500        900      =A20-(A3 or A2 or A1)
Excel has to check if cell A3 has a number in it, if true, then A20-A3
If A3 is blank, then check cell A2. If it has a number, then A20-A2
If A2 is blank, then A20-A1 (because A1 will always have a number)