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>
 
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Works perfect thank you!

I am still seeking a solution to column A on how to display the abbreviation for the month- if you have any suggestions.

Thanks again!
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Maybe this:

=MIN(CEILING(DAY(E2),7)/7,4)

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

Maybe this:

=MIN(CEILING(DAY(E2),7)/7,4)

Markmzz

Thank you, while I could not make this formula work- Just now, I was able to get =E2 to work by changing the formatting.

Thank you all for your help today!!
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Thank you, while I could not make this formula work- Just now, I was able to get =E2 to work by changing the formatting.

Thank you all for your help today!!

Hi!

Here is the result of my suggestion:

In A2 and copy down

=PROPER(TEXT(E2,"mmm"))

In B2 and copy down and to the right

=MIN(CEILING(DAY(E2),7)/7,4)


[TABLE="class: grid, width: 672"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]MONTH[/TD]
[TD]WEEK Start[/TD]
[TD]WEEK End[/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]2[/TD]
[TD]Out[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]dom 01/out/2017[/TD]
[TD]seg 30/out/2017[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Out[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]dom 01/out/2017[/TD]
[TD]seg 30/out/2017[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Jan[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]dom 01/jan/2017[/TD]
[TD]ter 30/jan/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jan[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]dom 01/jan/2017[/TD]
[TD]ter 30/jan/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Set[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]sex 01/set/2017[/TD]
[TD]dom 30/set/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Jul[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]dom 01/jul/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]****[/TD]
[TD]********[/TD]
[TD]***********[/TD]
[TD]**********[/TD]
[TD]**************[/TD]
[TD]*********************[/TD]
[TD]*******************[/TD]
[TD]*******************[/TD]
[TD]******************[/TD]
[/TR]
</tbody>[/TABLE]

Markmzz
 
Last edited:
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Thank you- very helpful!
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Here is the result of my suggestion:

In A2 and copy down

=PROPER(TEXT(E2,"mmm"))
You can eliminate the PROPER function call as TEXT automatically returns the month name in proper casing...

=TEXT(E2,"mmm")
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

You can eliminate the PROPER function call as TEXT automatically returns the month name in proper casing...

=TEXT(E2,"mmm")

Hi Rick!

Unfortunately, in my version of Excel is not possible. Look at this:

=TEXT(E2,"mmm")


[TABLE="class: grid, width: 183"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]MONTH[/TD]
[TD]WEEK Start[/TD]
[TD]WEEK End[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]out[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]out[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]jan[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jan[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]set[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]jul[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]****[/TD]
[TD]********[/TD]
[TD]**********[/TD]
[TD]**********[/TD]
[/TR]
</tbody>[/TABLE]

Markmzz

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

Hi Rick!

Unfortunately, in my version of Excel is not possible
Well, that is a new one on me. I would have thought Microsoft would have made the output from the TEXT function consistent through all versions of Excel and, as such, it would never occur to me that the month name outputted from the TEXT function would be anything other than proper case. Thanks for letting me (all of us) know that is not the case.
 
Upvote 0
Re: Seeking formula to extract month and day and convert to month abbreviation and week number

Well, that is a new one on me. I would have thought Microsoft would have made the output from the TEXT function consistent through all versions of Excel and, as such, it would never occur to me that the month name outputted from the TEXT function would be anything other than proper case. Thanks for letting me (all of us) know that is not the case.

Here more examples with the TEXT function:

[TABLE="class: grid, width: 265"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]MONTH[/TD]
[TD]MONTH[/TD]
[TD]WEEK DAY[/TD]
[TD]WEEK DAY[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]abr[/TD]
[TD]abril[/TD]
[TD]qui[/TD]
[TD]quinta-feira[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]mai[/TD]
[TD]maio[/TD]
[TD]sáb[/TD]
[TD]sábado[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]jun[/TD]
[TD]junho[/TD]
[TD]seg[/TD]
[TD]segunda-feira[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]jul[/TD]
[TD]julho[/TD]
[TD]qua[/TD]
[TD]quarta-feira[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]ago[/TD]
[TD]agosto[/TD]
[TD]sex[/TD]
[TD]sexta-feira[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]set[/TD]
[TD]setembro[/TD]
[TD]dom[/TD]
[TD]domingo[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]****[/TD]
[TD]********[/TD]
[TD]**********[/TD]
[TD]**********[/TD]
[TD]**************[/TD]
[/TR]
</tbody>[/TABLE]

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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