Subtracting Text from Number
I am working in a large spreadsheet and need to be able to subtract to
columns without adding any new columns or using subtotals. If I have
words
and numbers in the columns, ex. "none", is there a function that will
eliminate the "value" error message when I subtract (ex. 9-none = value,
but
i want none or any text to be viewed as zero)?
Ex. of how it is currently (not) working
none - 9 = value (wrong)
12 - 9 = 3 (right)
Ex. of how I would like for it to work
none - 9 = -9 (right)
12 - 9 = 3 (right)
Assuming for this example that your data is in A1 and B1 and C1 is your
subtraction column... use this formula in C1...
=IF(A1="none",0,A1)-B1
If B1 could also have "none" in it, then use this...
=IF(A1="none",0,A1)-IF(B1="none",0,B1)
Note that the comparisons will be case sensitive.
Rick
|