1
votes

I am working on trying to come up with a Google Sheets formula to calculate a Largest Single Day Sum and a Smallest Single Day Sum over a range of dates. For Example:

Given the following sheet, I have a range of Dates A3:A12, and a range of profits, B3:B12. I want to use a formula to go over the range of dates and profits to then return the Date and Sum of the Largest Single Day Sum and the Smallest Single Day Sum. Is there any way to do this? Thanks.

enter image description here

1

1 Answers

1
votes

delete everything in E:F range and use this formula in E2 cell:

={QUERY(A3:B, 
  "select sum(B),A 
   where B is not null 
   group by A 
   order by sum(B) desc 
   limit 1 
   label sum(B)''", 0);
  QUERY(A3:B, 
  "select sum(B),A 
   where B is not null 
   group by A 
   order by sum(B) asc 
   limit 1 
   label sum(B)''", 0)}

0