Forum Discussion
MLF1912
Jan 31, 2026Copper Contributor
SUMIF (or other function) if the cell value in either of 2 columns is >0
I want to sum the cells in column C if the row value in column A is >0 OR if the row value in column B is >0 (not AND). With SUMIF, I tried setting the search range to both columns A and B, but the ...
IlirU
Feb 02, 2026Iron Contributor
Hi MLF1912,
For orientation see colors of cells in the screenshot above.
Use this formula in an empty cell:
=SUM(BYROW(A2:B11 > 0, OR) * C2:C11)or this formula:
=SUM((BYROW(--(A2:B11 > 0), SUM) = 1) * C2:C11)To ensure the formulas work correctly, you will need to use one of the following versions of Excel:
- Excel for Microsoft 365
- Excel for Microsoft 365 for Mac
- Excel for the web
In other versions of Excel, these formulas do not work.
If none of the solutions above match what you’re looking for, please explain your issue in more detail by providing an example and indicating what the total should be in your specific case. Also, please let us know which version of Excel you are using.
Hope this helps.
IlirU