There's been similar questions answered here but I've been unable to apply those tips to my scenario. I keep data on gambling wins and loses. I want to calculate averages based on the day of the week. I should point out my spreadsheet includes dates with no data (for a reason). The formula I've been trying use for this is =AVERAGE(IF(C2:C19="Mon",B2:B19)). I've included a sample sheet. My knowledge of spreadsheets is severely limited. I know just enough to get in trouble. Thanks in advance for any help, this is my first question on the forum.

1 Answer 1



=query(A2:B,"select dayOfWeek(A), avg(B) where not A is null group by dayOfWeek(A) label dayOfWeek(A) 'Day', avg(B) 'Average by Day' format dayOfWeek(A) 'dddd' ")

This will generate all the results in one go.

  • Nicely done! If I could I'd buy you and your friends a round of beers but I guess saying thanks will have to do. Thank you!!
    – lsc1952
    Commented Jan 25, 2022 at 3:34
  • I'm glad I could help. Please see What should I do when someone answers my question?.
    – user290033
    Commented Jan 25, 2022 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.