Thread: If Function
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Micki Micki is offline
external usenet poster
 
Posts: 38
Default If Function

I hate syntax. Thanks Jim. And thank you too BoniM.

"Jim Thomlinson" wrote:

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

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

--
HTH...

Jim Thomlinson


"Micki" wrote:

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.