Show Month from Week #
Hello,
I'm creating a helper column that needs to show what month a week number was from.
For Example, I have a sheet with a [Date] column and [Week #] column.
I have second sheet that has a Week # and is pulling data from my first sheet based on a calculation using Week #.
In the second sheet, I'd like to create a helper column that displays the Month that the Week # is from, I.E. - Week 1 = January, Week 6 = Feb, etc...
Can this be done with a formula?
Best Answer
-
The easiest way to do this is in stages on a reference sheet.
Step 1:
Create a date type column and enter ever date from Jan 1 to Dec 31.
Step 2:
Create a text/number column called "Weeknumber" and use this formula:
=WEEKNUMBER([Date Column]@row)
Step 3:
Create a text/number column called "Month Number" and enter the numbers 1 - 12 in it.
Step 4:
Create a text/number called "Month Text" and enter the desired text for each month.
Step 5:
Create a text/number column to house the final desired output of the month in relation tot he week number and use this formula
=INDEX([Month Text]:[Month Text], MATCH(MONTH([Date Column]@row), [Month Number]:[Month Number], 0))
Now you have a table that has every date, the corresponding week number, and the appropriate month text.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
The easiest way to do this is in stages on a reference sheet.
Step 1:
Create a date type column and enter ever date from Jan 1 to Dec 31.
Step 2:
Create a text/number column called "Weeknumber" and use this formula:
=WEEKNUMBER([Date Column]@row)
Step 3:
Create a text/number column called "Month Number" and enter the numbers 1 - 12 in it.
Step 4:
Create a text/number called "Month Text" and enter the desired text for each month.
Step 5:
Create a text/number column to house the final desired output of the month in relation tot he week number and use this formula
=INDEX([Month Text]:[Month Text], MATCH(MONTH([Date Column]@row), [Month Number]:[Month Number], 0))
Now you have a table that has every date, the corresponding week number, and the appropriate month text.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thanks! That worked well.
Now, I assume that I need to reference this when creating the helper column on my original sheet? How does that work?
-
That would be another INDEX/MATCH.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thanks Paul!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!