Why not just put a value in B6 like 1 or something so it won't divide by 0?

Or, more complex, put an IF condition in G6 like IF(ISBLANK(B6),"",else whatever)