Pulling data from a specific worksheet depending on what Quarter it is

jconkl02

Board Regular
Joined
May 25, 2016
Messages
55
I have a formula that goes like this:
=COUNTIFS('Q3 Tickets'!$B:$B,">="&AM$2,'Q3 Tickets'!$B:$B,"<"&AM$3,'Q3 Tickets'!$E:$E,"SEV1")

It is looking in a worksheet called Q3 Tickets and finding all of the tickets that were created this week and were a Severity 1 ticket.

What I want to do is have it be able to pull the data from Q3 Tickets in the 3rd quarter, but be smart enough to go to the aptly named Q4 Tickets in a couple of weeks. Any ideas?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
It sounds like you want to user the INDIRECT formula here to change from Q3 to Q4.

The next question would be how do you want it to know when it is supposed to switch from Q3 to Q4?
If you want to just use today's date then you can determine the quarter today is in using the formula:
Code:
=ROUNDUP(MONTH(TODAY())/3,0)
and that will just give you a number 1, 2, 3, or 4.
If it's based on a date in a particular cell instead of the date you are actually using the spreadsheet then just replace TODAY() with the cell address.

Combining that with the INDIRECT formula in the formula you provided would give you the following:
Code:
=COUNTIFS(INDIRECT("'Q" & ROUNDUP(MONTH(TODAY())/3,0) & " Tickets'!$B:$B"),">="&AM$2,INDIRECT("'Q" & ROUNDUP(MONTH(TODAY())/3,0) & " Tickets'!$B:$B"),"<"&AM$3, INDIRECT("'Q" & ROUNDUP(MONTH(TODAY())/3,0) & " Tickets'!$E:$E"),"SEV1")

Hopefully that gets you going in the right direction.
 
Upvote 0
Solution

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

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