Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have (letters up top are column names):

|  J |  M    |   N   |  O  |
|    |kennedy|  2    |   4 |
|    |nixon  |   3   |   2 |
|    |       |   8   |     |
|    |  bush |       |     |
|    |       |       |     |
|    |       |       |     |

If Column M is blank, J should be zero (same row)
If Column M is filled, N should be added up with O.

This is what I have tried (placed in J2):


Could someone please explain why this does not work/what does?

share|improve this question
add comment

1 Answer

For vanilla Excel, the following code does exactly what you want:


Using semi-colons is not standard. Does the following work for you?


Your versions of Excel and Windows may be important to discovering idiosyncrasies like this in the future.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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