Sign in to join the conversation:
Can you help me find a formula that returns 1st date of next quarter? For example, 07/17/2018 should return 10/01/2018. Likewise 08/17/2018 should also return 10/01/2018.
You can use the =Date(year, month, day) formula. The day and the year are both fairly easy, the trick is getting the month right. I've got two solutions.
Nested if statement:
There are 4 quarters in a year, so you'd need at least 3 'if' statements. It would look something like this (where A1 is the date your referencing)
=Date(year(A1), if(month(A1)<4, 4, if(month(A1)< 7, 7, if(month(A1)<10, 10, 1))), 1)
To translate:
It won't change the year. As for the month, if your original date is Jan-Mar, then it will set the month to April. Otherwise if your original date is Apr-Jun, then it will set the month to July. Otherwise if your original date is Jul-Sep, then it will set the month to October. Otherwise it will set it to January. The day will always be set to 1.
Nested if statements are messy, and it's very easy to lose track of all the brackets. However you should just be able to copy/paste that formula into your sheet, and just update the cell references.
The second solution is using a vlookup. It looks nicer, but requires you to use another sheet. Would look something like this
=Date(year(A1), vlookup(A1, table_array, 2, false), 1)
Where the table_array is on another sheet and is just a list of the months (1 - 12) with the corresponding 'quarterly months' in the second column.
Hope that answers your query.
EDIT: I realised I didn't handle the year correctly. If the month is Oct-Dec we will be moving into the new year so will want the year to increase by 1. The revised formula is:
=Date(if(month(A1)>=10, year(A1)+1, year(A1)), if(month(A1)<4, 4, if(month(A1)< 7, 7, if(month(A1)<10, 10, 1))), 1)
The second solution is using a vlookup. It looks nicer, but requires you to use another sheet.
Not necessarily. You could use two helper columns for the table and just hide them once you have your formula built.
Hi, "Fields marked with an asterisk (*) are required." is the very first line in the body of every form I create. I don't remember seeing it before (unless you missed filling out a required field; then you would see the message). Is there a way to turn it off or change it? None of my forms are in English so the message is…
I have a sheet that I pull into a report. The report I then want to use to make a stacked bar chart and put into a dashboard if I can. The columns I am trying to make into a stacked chart are: Lead, project and phase. The issue is that there are several leads and I need the stacked bar chart to show in different colors for…
I have a dynamic view setup for a dashboard that has NO restrictions And on the Sharing tab, I have a Group that I created as the additional share access to the view But the individuals in the Group still cannot see the data from the dashboard. Am I missing something? Because when I share the view to them individually…