Formula to extract month and day and convert to month abbreviation and week number

wmichael

Board Regular
Joined
Aug 26, 2014
Messages
113
Office Version
  1. 365
  2. 2019
  3. 2007
Platform
  1. Windows
  2. Mobile
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

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[/TR]
[TR]
[TD]MONTH[/TD]
[TD]WEEK[/TD]
[TD]PAST DATE START[/TD]
[TD]PAST DATE END[/TD]
[TD]CURRENT DATE START[/TD]
[TD]CURRENT DATE END[/TD]
[TD]FUTURE DATE START[/TD]
[TD]FUTURE DATE END[/TD]
[/TR]
[TR]
[TD]Oct[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun, Oct 1, 2017[/TD]
[TD]Mon, Oct 30, 2017[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Oct[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun, Oct 1, 2017[/TD]
[TD]Mon, Oct 30, 2017[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun, Jan 1, 2017[/TD]
[TD]Tue, Jan 30, 2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun, Jan 1, 2017[/TD]
[TD]Tue, Jan 30, 2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sep[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Fri, Sep 1, 2017[/TD]
[TD]Sun, Sep 30, 2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun, Jul 1, 2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

what is the rationale behind the week number?
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and 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.

I think the question was "how do you calculate column B?"

WBD
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

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.
 
Upvote 0
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
 
Upvote 0
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

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.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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