# Thread: Formula to extract month and day and convert to month abbreviation and week number

1. ## Formula to extract month and day and convert to month abbreviation and week number

Hello.

Seeking a formula to extract details from the CURRENT DATE START (E) cell to populate in the MONTH (A) cell and the WEEK (B) cell instead of me manually entering the month and week- appreciate your help in advance. Thank you.

--- Michael

 A B C D E F G H MONTH WEEK PAST DATE START PAST DATE END CURRENT DATE START CURRENT DATE END FUTURE DATE START FUTURE DATE END Oct 4 Sun, Oct 1, 2017 Mon, Oct 30, 2017 Oct 4 Sun, Oct 1, 2017 Mon, Oct 30, 2017 Jan 4 Sun, Jan 1, 2017 Tue, Jan 30, 2018 Jan 4 Sun, Jan 1, 2017 Tue, Jan 30, 2018 Sep 1 Fri, Sep 1, 2017 Sun, Sep 30, 2018 Jul 2 Sun, Jul 1, 2018

2. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

In A2 you can simply put:

Code:
`=\$E2`
And format the cells as "mmm". Alternatively you could use:

Code:
`=TEXT(\$E2,"mmm")`
For column B, I don't understand how you get those numbers. I thought you would just be putting

Code:
`=WEEKNUM(\$E2)`
But that does give your example values.

WBD

3. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

what is the rationale behind the week number?

4. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Originally Posted by VBA Geek
what is the rationale behind the week number?
Thank you for asking- this data is part of an event planning spreadsheet that can sort events and associated tasks in many ways including the month and week they happen in- in order for task owners to plan two years out.

5. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Hello. =\$E2 does not render "Oct" only but rather duplicates the cell in E2

=\$E2

6. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Select column A, press Ctrl+1, go to the Number tab, select Custom and enter "mmm" (without quotes) in the Type: field.

WBD

7. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Originally Posted by wmichael
Thank you for asking- this data is part of an event planning spreadsheet that can sort events and associated tasks in many ways including the month and week they happen in- in order for task owners to plan two years out.
I think the question was "how do you calculate column B?"

WBD

8. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Originally Posted by wideboydixon
I think the question was "how do you calculate column B?"

WBD
To calculate column B: if the day of the month is 1-7 the B would equal the number one. if the day of the month is 8-14 the B would equal the number two. if the day of the month is 15-21 the B would equal the number three. if the day of the month is 22-31 the B would equal the number four.

9. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

That doesn't match with your data. All dates are 1st of the month so all weeks should be 1. However, for that calculation in B2:

Code:
`=INT((DAY(E2)-1)/7)+1`
WBD

10. ## Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Originally Posted by wideboydixon
That doesn't match with your data. All dates are 1st of the month so all weeks should be 1. However, for that calculation in B2:

Code:
`=INT((DAY(E2)-1)/7)+1`

WBD
You are correct and thank you for calling out any confusion. My statement does not match my data, which is poor editing on my part before posting, but my statement is the result I am seeking.