-1

In Google Sheets I have a column (column M) which has values of either "-" or a number. I'm trying to figure out if there is a way to make a formula that would divide column M by column N only if the value in column M isn't a "-"

I tried several variations on the formula below but could not make it work.

=IF(M2="-","-",(=M2/N2))

1 Answer 1

0
=IF(M2="-",,M2/N2)

Or, for the whole column at once, assuming no blank cells in column M:

=ARRAYFORMULA(IF(M2:M="-",,M2:M/N2:N))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.