Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
If Function
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
If Function
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
If Function
Your formula is fine, as long as your range (M2:M7) contains values. What
data do you have in this range? "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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |