Reputation: 126
I need to sum values in column H for the last 52 rows with a formula, starting in H3. Rows will be added regularly.
=query("H" & IF( COUNT(H3:H)-52+2<3,3, COUNT(H3:H)-52+2) & ":H" & COUNT(H3:H)+2,"select sum(H)",-1)
EDIT:
This is also not working, why? If I use concatenate I see "H5:H57"
=sum("H"& trim(IF( COUNT(H3:H)-52+2<3,3, COUNT(H3:H)-52+2)) & ":H" & trim(COUNT(H3:H)+2))
Upvotes: 0
Views: 866