Quote Originally Posted by Yongle View Post
Our posts just crossed.
The above will work if the cell contains a zero.
But now you have added another condition. You also want it to check if the cell is blank.
If we sort that are we done?
Quote Originally Posted by Yongle View Post
So change the condition to reflect that
FROM:
=IF(J9="","XXX",IF(J9>Agency_Contract!X9,J9-Agency_Contract!X9,VLOOKUP(D9,Agency_Contract,22,1)))
TO:
=IF(Agency_Contract!X9=0,"XXX",IF(J9>Agency_Contract!X9,J9-Agency_Contract!X9,VLOOKUP(D9,Agency_Contract,22,1)))

and then alter the "XXX" to whatever you want the cell to show
ok another problem now the vlookup part is not working, referencing D9 or D10 or what ever is in Col D