+ Reply to Thread
Results 1 to 8 of 8

First day of month falls on a Monday VBA issue

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    First day of month falls on a Monday VBA issue

    Hey all,

    This month I came across a problem.
    I have a workbook with code in that pulls data from a previous workbook (last month), in order to rank things.
    My issue is that when the first of the month falls on a Monday, my 5 week basis (starting on Monday) falls through.
    What I mean by that is that November's 5 weeks include the few days from October that fell in the first week, however, with December starting on a Monday, it doesn't include any of the previous month.

    So to cut to the chase, I need some code that in effect says:

    If the next Month starts on a Monday then do this...

    Else do this...


    Thanks in advance for your help.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: First day of month falls on a Monday VBA issue

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    Re: First day of month falls on a Monday VBA issue

    The only thing I need is the IF statement to determine whether the next month will begin on a Monday.
    The rest I can input by myself, but thank you anyway.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: First day of month falls on a Monday VBA issue

    I would need to, at least, see your code

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    Re: First day of month falls on a Monday VBA issue

    That's fair enough.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: First day of month falls on a Monday VBA issue

    The actual date seems problematic but maybe:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    Re: First day of month falls on a Monday VBA issue

    Thank you, I'll give that a whirl!

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: First day of month falls on a Monday VBA issue

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 12
    Last Post: 06-13-2014, 05:03 PM
  2. Find every Monday in a month using VBA
    By EmmaO91 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2014, 07:32 AM
  3. [SOLVED] Sum from the last Monday of the month previous
    By Berna11 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-17-2013, 03:26 PM
  4. [SOLVED] Formula has to take Monday if due date falls on a Sunday
    By Revathi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-28-2006, 07:15 AM
  5. Replies: 1
    Last Post: 04-13-2005, 06:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1