• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Total and Weekly Average with formula

Soleblue

New Member
Good morning guys and good Sunday!:)

I would like to know if there is a formula that can help me with a sheet that I make every week to make a total and average (from Monday to Sunday) of what my animals have eaten.

In red I have put what I always do "manually".
I gave the example of only animal 1 but I would need all 3 animals.

Thank you very much to those who use their time to help me :)
 

Attachments

  • TotYProm2.xlsx
    10.4 KB · Views: 9
Try,

1] J2, copied down:

=SUMIFS(C:C,B:B,">="&H2,B:B,"<="&I2,A:A,F2)

2] K2, copied down:

=J2/7
Thank you so much Bosco for your time :)
My excel is Italian
I translated =SOMMA.PIU.SE but it tells me there is an error. Maybe I need to correct some "." or some "," :rolleyes:
I'm tryng and I tell you ;)
 
I'm not succeeding, it gives me this error :confused:

"This formula is missing a reference to a defined range or name"

I don't understand where I'm wrong, have you tried it in your excel?
 
Bosco's formula works great
Code:
=SOMMA.PIU.SE(C:C;B:B;">="&H2;B:B;"<="&I2;A:A;F2)
Do you need an accent over the U in PIU?
 

Attachments

  • TotYProm2.xlsx
    10.9 KB · Views: 5
I'm not succeeding, it gives me this error :confused:

"This formula is missing a reference to a defined range or name"

I don't understand where I'm wrong, have you tried it in your excel?
I enclosed a English version Excel file for your action.
 

Attachments

  • TotYProm2.xlsx
    12.2 KB · Views: 6
Grazie!!!!!!!!!!!!!!! :DD Yes, Yes ....I put the "U´´" but

I found the error. I copied your formula:
=SUMIFS(C:C,B:B,">="&H2,B:B,"<="&I2,A:A,F2)
but the problem was:
=SOMMA.PIÙ.SE(C:C,B:B,">="&H2,B:B,"<="&I2,A:A,F2)
that in your formula there was "," and I had to change it to ";"

Now I'll try to put everything in the original file and I'll tell you in a few minutes
thank you for your time ;)
 
It's perfect, you saved me a lot of time and above all eliminated the margin for errors.

Thank you very much :DDand I love Excel more every day! :p
 
A pivot table will get you this without formulae. See attached.

1698249379749.png
 

Attachments

  • Chandoo55254Fortest_02.xlsx
    21.9 KB · Views: 3
The is an Excel 365 solution that exploits the regularity of the input date to manipulate the dataset as arrays. The bad news is that the formula is something of a monster: the good news is that there is only one cell with any formula!
Code:
= LET(
    sortedByNombre,  SORTBY(ComidoTbl, Nombre),
    animalNombres,   CHOOSECOLS(sortedByNombre,1),
    animalNombre,    TAKE(WRAPROWS(animalNombres, 7),,1),
    days,            WRAPROWS(CHOOSECOLS(sortedByNombre, 2), 7),
    period,          CHOOSECOLS(days,{1,-1}),
    sortedComido,    CHOOSECOLS(sortedByNombre, 3),
    amountsByPeriod, WRAPROWS(sortedComido, 7),
    totalsByPeriod,  BYROW(amountsByPeriod, SUMλ),
    averageByPeriod, BYROW(amountsByPeriod, AVERAGEλ),
    SORT(HSTACK(animalNombre, period, totalsByPeriod, averageByPeriod), 2)
  )
[my apologies for introducing so much English into the formula]
1698354773601.png
 

Attachments

  • TotYProm2.xlsx
    22.7 KB · Views: 2
Back
Top