bearcub
Well-known Member
- Joined
- May 18, 2005
- Messages
- 734
- Office Version
- 365
- 2013
- 2010
- 2007
- Platform
- Windows
I have separate column for the Year, Quarter and Date. I have 3 records representing each quarter. I want to create a formula that will assignment the month associated with each quarter. The columns that i have in this table is this:
I added a custom column with the following formula which combined these 3 columns into this format.
1/1/2012
2/1/2012
3/1/2012
4/1/2012 ...
I used the #date function to perform this operation:
#date ([Year],([Quarter]-1)*3+[Month],1)
Question: What does the -1 *3 + [Month] do in the formula. The field headers in the formula are the column names.
I'm trying to wrap my head around how this works. Why the addition sign and Quarter -1 throws me.
What would be the equivalent formula in Excel?
Thank you for your help,
Michael
Code:
Year Quarter Month
2012 1 1
2012 1 2
2012 1 3
2012 2 4
2012 2 5
2012 2 6
2012 3 7
2012 3 8
2012 3 9
2012 4 10
2012 4 11
2012 4 12
I added a custom column with the following formula which combined these 3 columns into this format.
1/1/2012
2/1/2012
3/1/2012
4/1/2012 ...
I used the #date function to perform this operation:
#date ([Year],([Quarter]-1)*3+[Month],1)
Question: What does the -1 *3 + [Month] do in the formula. The field headers in the formula are the column names.
I'm trying to wrap my head around how this works. Why the addition sign and Quarter -1 throws me.
What would be the equivalent formula in Excel?
Thank you for your help,
Michael