I have data in Column D that is formatted as text (Credit or Debit), and data in Column E that is formatted as Number (General). Integers, actually, some with minus signs.
I have this in one cell (N129, if that matters): =SUMIFS($E2:$E128,$D2:$D128,"=$o$129")
and this in cell O129: "Credit"
Cell N129 displays: Err:508
Win 11 + Apache 4.1.16 from the Microsoft Store.
Thanks in advance for any insight you might provide.
Last edited by MrProgrammer on Wed Feb 04, 2026 4:03 am, edited 2 times in total.
Reason:Tagged ✓ [Solved]; Solution given and no further questions from __John_L.
__John_L. wrote: Tue Jan 27, 2026 3:59 am
=SUMIFS($E2:$E128,$D2:$D128,"=$o$129")
Try =SUMPRODUCT($E2:$E128;$D2:$D128=$O$129). I can't test that because I don't have your data. Use semicolon in the formula before $D2, not comma. [Tutorial] The SUMPRODUCT function
If you need any additional assistance attach a spreadsheet demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document.
__John_L. wrote: Tue Jan 27, 2026 3:59 am
Win 11 + Apache 4.1.16 from the Microsoft Store.
I changed your forum signature shown at the bottom of your post from OpenOffice v4.1.7 Windows 10 to OpenOffice 4.1.16 Windows 11.
If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Distrusting my understanding of the "criteria" concept I mostly use SUMPRODUCT() which offers an imo clearer way to get expressions doing things for what SUMIF() and SUMIFS() may be appropriate. See example:
"The criterion concept is easily misunderstood, IMO, or not clearly enough specified" (cell B1)
Indeed.
Where is example of SUMIFS with mode modifier "(?-i)"
The formula in cell C27 reads =SUMPRODUCT($E$27:$E$44, IFERROR(REGEX($F$27:$F$44, $K27, , 1), "")<>"")
Would a shorter formula =SUMPRODUCT($E$27:$E$44, ISTEXT(REGEX($F$27:$F$44, $K27, , 1))) do?
"SUNIFS() expressions can often be replaced by clearer SUMPRODUCT() expressions." (cell D1)
SUNIFS it is a pretty funny function name.
[2] Where is example of SUMIFS with mode modifier "(?-i)"
[3] The formula in cell C27 reads =SUMPRODUCT($E$27:$E$44, IFERROR(REGEX($F$27:$F$44, $K27, , 1), "")<>"")
Would a shorter formula =SUMPRODUCT($E$27:$E$44, ISTEXT(REGEX($F$27:$F$44, $K27, , 1))) do?
[4] "SUNIFS() expressions can often be replaced by clearer SUMPRODUCT() expressions." (cell D1)
SUNIFS it is a pretty funny function name.
[2] Sorry. I didn' give an example. Try (?-i)a(?i)b and copy the formulas to the respective row.
[3] Yes. I think so.
[4] Indeed. I should also have suggested SUNPRODUCT. Or would that have violated copyright?
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
If the SUMIF and SUMIFS function criterion is stored in a cell, its address does not need to be specified as absolute. It must be specified as absolute when the SUM function is used for summing in matrix form.