Put the following formula in cell c1 and copy down to additional rows. Please note, per your request this only works with a numeric value in b1 or a1&b1. If a value exists in a1 only, c1 will remain blank.
=IF(AND(CELL("type",B1)="v",CELL("type",A1)="v"),B1-A1,IF(CELL("type",B1)="v",B1,""))