Sure. Do you mean there is a cell with a string that says either "income" or "expense"? Let's say that string is in A1. You have a bunch of numbers that you are summing in A2:A100.

=IF(A1="expense",-1,1)*SUM(A2:A100)