You don't need VBA to do that. Write add a third cell whose value is 0 if you have nothing entered, 1 if dollar amount only, 2 if % amount, 3 if both.
=if( AND( A5="", B5="" ), 0, IF( AND( A5<>"", B5="" ), 1, IF( AND( A5="", B5<>"", 2, 3 )))Where A5 has the $ cell and B5 has the % cell.
Then...