Forum Discussion
Excel 365: Unable to calculate quarterly data from monthly data
Hello,
I am trying to use the following formula to calculate quarterly sales: =SUM($AG12:$AR12*(ROUNDUP(MONTH($AG$1:$AR$1)/3,0)=COLUMN(AF:AF)))
Unfortunately, the above formula is returning 0. I did ensure that Cols AG1 to AR1 are formatted as Date. I then used a separate worksheet to test the above formula with dummy data using the following formula syntax: =SUM($B$2:$M2*(ROUNDUP(MONTH($B$1:$M$1)/3,0)=COLUMN(A:A)))
And this worked perfectly. The only difference is that the column references in the first formula do not start at the beginning of the worksheet. Could this be the problem?
Hope you can point me in the right direction. Thank you.
1 Reply
- Riny_van_EekelenPlatinum Contributor
I assume you want to copy this formula horizontally to return the quarterly total. Then, just change the last bit to COLUMN(A:A) and it shall work.
The calculated quarter number is either 1, 2, 3 or 4 but COLUMN(AF:AF) and copied right will give you 32, 33, 34 and 35.