Nikiahll82

New Member
Joined
Jun 7, 2019
Messages
1
Hello,

I am wondering how to enter the month and date on a new spread sheet that excludes sat and sun but adds tues and thur twice on the spead sheet. Can someone assst? It should look like this
Monday, June 3, 2019
Tuesday, June 4, 2019
Tuesday, June 4, 2019
Wednesday, June 5, 2019
Thursday, June 6, 2019
Thursday, June 6, 2019
Friday, June 7, 2019
Monday, June 10, 2019
Tuesday, June 11, 2019
Tuesday, June 11, 2019
Wednesday, June 12, 2019
Thursday, June 13, 2019
Thursday, June 13, 2019
Friday, June 14, 2019

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
given the first 7 rows are formatted excel-dates put
=A1+7
on the june 10-cell and copy down
 
Upvote 0
Try this for results starting "A1"
Code:
[COLOR="Navy"]Sub[/COLOR] MG07Jun53
[COLOR="Navy"]Dim[/COLOR] Mth [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer,[/COLOR] n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] nDt [COLOR="Navy"]As[/COLOR] Date, oDt [COLOR="Navy"]As[/COLOR] Date, c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
oDt = DateAdd("d", -1, DateSerial(Year(Date), Month(Date), 1))

[COLOR="Navy"]For[/COLOR] n = 1 To 31
    nDt = DateAdd("d", n, oDt)
    [COLOR="Navy"]If[/COLOR] Month(nDt) = Month(Date) + 1 [COLOR="Navy"]Then[/COLOR] [COLOR="Navy"]Exit[/COLOR] For
        Select Case WeekdayName(Weekday(nDt), False, 1)
            [COLOR="Navy"]Case[/COLOR] "Monday", "Wednesday", "Friday"
                c = c + 1
                Cells(c, 1) = Format(nDt, "dddd, d mmm, yyyy")
            [COLOR="Navy"]Case[/COLOR] "Tuesday", "Thursday"
                c = c + 1
                Cells(c, 1) = Format(nDt, "dddd, d mmm, yyyy")
                c = c + 1
                Cells(c, 1) = Format(nDt, "dddd, d mmm, yyyy")
            [COLOR="Navy"]End[/COLOR] Select
[COLOR="Navy"]Next[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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