0

I have the following formula in a cell:

=IF(Q12,ROUND(SUM(Q12:Q18)/7,2),"")

Now when I drag it down I want it to calculate SUM for Range Q19:Q25 i.e it should be;

=IF(Q19,ROUND(SUM(Q19:Q25)/7,2),"")

I believe OFFSET is the function to add in the formula but I am not sure how to do it.

2 Answers 2

3

You are correct, OFFSET will do this job nicely, but in writing your answer, I have had to make a consideration to the fact that I don't know what offset your formula is to the sum range!

This will do the job, and if your formula isnt in row 1, you'll need the change both of the row() - 1 statements to offset the formula back to 0 (i.e. if this formula starts in row 12, change row() - 1 to row() - 12

=IF(OFFSET($Q$12,(ROW()-1)*7,0),ROUND(SUM(OFFSET($Q$12:$Q$18,(ROW()-1)*7,0))/7,2),"")

Having said all of that, you have a conditional (=If(Q12) and a sum pointing to the same place, shouldn't you be checking Q12 for some truth, then summing? I don't know what your data set is though, so I could be talking rubbish.

Hope this helps!

Sign up to request clarification or add additional context in comments.

3 Comments

Aww pnuts, beat me by 19 seconds! Damn this tablet keyboard!
Thanks @AndrewWynn :)
Thanks! @pnuts I think I have found a new hobby for public transport. Answering Excel questions without Excel as reference can be a challenge.
2

Taking only the SUM part of your formula and assuming placed in Row1 please try:

=SUM(OFFSET(Q$12,7*(ROW()-1),,7,1))

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.