If Function

M

Micki

In cell L8 is the number-3 and in cell M8 is the number -7. The numbers
represent results of a countif formula. In cell M12, I want to sum specific
cells if the L8 and M8 values are equal and if they are not equal, I want to
sum the same cells and subtract L8 and add M8.
The formula I have is:
=IF(M8=L8,M11+SUM(M2:M7),SUM(M2:M7-L8+M8))

I'm getting a #VALUE! error. Any help would be appreciated.
 
J

Jim Thomlinson

your sum function can not handle the - operator inside it. Try this...

=IF(M8=L8,M11+SUM(M2:M7),SUM(M2:M7)-(L8+M8))
 
B

BoniM

Your formula is fine, as long as your range (M2:M7) contains values. What
data do you have in this range?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top