offset index match to sum quarterly figures

Chris00000

New Member
Joined
Jul 2, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to pull quarter-to-date figures from a model that doesn't have dates but rather has months in Jan Feb Mar (etc) format. A2 is my reference date, which is simply a TODAY() formula. Column O is the values, M is the numeric values I inserted next to Jan Feb Mar, etc. My issue is that my current month is July, so the alternative IF statement should work, but it seems it's only pulling the first IF result. Even if I use 0 in the alternative, the first IF result is pulled.

=IF(OR(VALUE(MONTH($A$2))<>1,VALUE(MONTH($A$2))<>4,VALUE(MONTH($A$2))<>7,VALUE(MONTH($A$2))<>10),SUM(INDEX($O$8:$O$19,MATCH(VALUE(MONTH(EOMONTH($A$2,MOD(-MONTH($A$2),3)-3))+1),$M$8:$M$19,0)):OFFSET(INDEX($O$8:$O$19,MATCH(VALUE(MONTH($A$2)),$M$8:$M$19,0)),-1,0))/1000+INDEX($O$8:$O$19,MATCH(VALUE(MONTH($A$2)),$M$8:$M$19,0))/1000*(($A$2-EOMONTH($A$2,-1))/(EOMONTH($A$2,0)-EOMONTH($A$2,-1))),0)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi Chris00000,

I'm not sure what you're trying with that first IF statement but if the month of the date in A2 is July then the OR will always return TRUE.

It would be helpful if you could use XL2BB to show us a mini sheet of your data and calculations.
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,405
Members
449,157
Latest member
mytux

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top