MarkF wrote:I believe sumifs is what i want.

SUMIFS is cumbersome and feeble. Is the data in F and G numeric or text? Read section

1. Types of data in

Ten concepts that every Calc user should know. Only use quotes in the formula if the values in the column are text.

MarkF wrote:I am getting error 508 …

The only valid use for a comma in an OpenOffice Calc formula is as a

decimal sign if your

locale uses commas to separate the integer and fractional parts of numbers, as is used in many countries where π is written 3,14159…. You are incorrectly putting a comma after the ranges in your formula.

[Tutorial] Calc formula termsMarkF wrote:=SUMIFS($D$18:$D$2000;$A$18:$A$2000,>= DATE("07/01/21");$A$18:$A$2000,< DATE("8/1/21");$F$18:$F$2000, = "4";$G$18:$G$2000, = "51")

For numeric data try:

=SUMPRODUCT($D$18:$D$2000;YEAR($A$18:$A$2000)=2021;MONTH($A$18:$A$2000)=7;$F$18:$F$2000=4;$G$18:$G$2000=51)or

=SUMPRODUCT($D$18:$D$2000;TEXT($A$18:$A$2000;"YYYYMM")="202107";$F$18:$F$2000=4;$G$18:$G$2000=51)For text data try:

=SUMPRODUCT($D$18:$D$2000;YEAR($A$18:$A$2000)=2021;MONTH($A$18:$A$2000)=7;$F$18:$F$2000="4";$G$18:$G$2000="51")or

=SUMPRODUCT($D$18:$D$2000;TEXT($A$18:$A$2000;"YYYYMM")="202107";$F$18:$F$2000="4";$G$18:$G$2000="51")[Tutorial] The SUMPRODUCT functionMarkF wrote:… each category in columns F and G …

Each?? If you use a

Pivot Table you can get summaries for all the combinations of values in F and G without writing any formulas.

For

any additional assistance,

attach a document demonstrating the situation

(remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself). Explain your goal.

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.
Mr. Programmer

AOO 4.1.7 Build 9800 on MacOS 10.14.6. The locale for any menus or Calc formulas in my posts is English (USA).