+ Reply to Thread
Results 1 to 3 of 3

Looping Problem

  1. #1
    Registered User
    Join Date
    03-23-2015
    Location
    Cardiff, Wales
    MS-Off Ver
    2003
    Posts
    1

    Looping Problem

    Please Login or Register  to view this content.
    When looping though this IF statement it will only loop 31 times.
    If I change the number to 35, itll loop 35 times, but there are only 31 days in January so want it to start from 1 after 31.
    It is ment to set the date on a calender 5 weeks in length.
    If it starts on 4 it will finish on 4 and miss the last 3 days dates, same happends with any start number, 5 ends on 5, 9 ends on 9, etc...

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2508 Win 11
    Posts
    24,958

    Re: Looping Problem

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,794

    Re: Looping Problem

    It is ment to set the date on a calender 5 weeks in length.
    Not sure I understands your problem properly but as you know the month, the day (Activecell value) and you could add the year you could perhaps do something like this where cell A1 contains you made up start date.

    Please Login or Register  to view this content.
    The date format ("yyyy-mm-dd") is the Swedish/Scandinavian setting, you may have change that to fit your needs.

    Alf

+ 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. [SOLVED] Looping problem
    By Joachimjr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2014, 08:59 AM
  2. Problem with looping -can anybody help??
    By alexanderjeans in forum Excel Programming / VBA / Macros
    Replies: 53
    Last Post: 01-23-2013, 02:51 PM
  3. Looping Problem
    By Spasm in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 07-09-2011, 02:32 PM
  4. Looping Problem
    By Stuie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2006, 12:15 PM
  5. [SOLVED] Looping Problem
    By Paul Black in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2005, 05:05 AM

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