I have been at this for a couple days now and could use some help on this matter… I am trying to sum up the DH and Miles values from the "Load List" sheet, for each Driver within two given dates using an Array Formula.
I have the following SUMIFS()
for each cell in column "D" of “done Driver Data” sheet, and I get the correct result. But I would really like to convert it to an Array Formula.
For readability I have separated the formula by arguments.
=(SUMIFS('Load List'!M:M,
'Load List'!G:G,A2,
'Load List'!H:H,">="&$N$2,
'Load List'!H:H,"<="&$O$2)
+
SUMIFS('Load List'!N:N,
'Load List'!G:G,A2,
'Load List'!H:H,">="&$N$2,
'Load List'!H:H,"<="&$O$2))
Now, here is how far I've come...
=ArrayFormula({"Miles";sumifs('Load List'!M2:N,
'Load List'!G:G,A2,
'Load List'!H:H,">="&$N$1,
'Load List'!H:H,"<="&$O$1)})
Also tried this one which is adding the miles, but does not filter them...
={"Miles";ArrayFormula(sumif('Load List'!G2:G,A2:A,
'Load List'!M:M)+
sumif('Load List'!G2:G,A2:A,
'Load List'!N:N)+
sumif('Load List'!H2:H,N1,
'Load List'!N:N))}
It seems that SUMIFs is not supported unless regexmatch is used, which I also could not get to work.
I've also tried using multiple SUMIF to get the same result.
I read that Query
is the way to go, but I have zero idea how to use query. I'd prefer to stick with Array if possible.
Here is a link to the sheet with the data. The Arrays are for C1:E1 (highlighted in blue)
https://docs.google.com/spreadsheets/d/1KC0yQYL50UOnIkvCslIbDM3PZVccx97uN1PbMf6Z52o/edit?usp=sharing