+ Reply to Thread
Results 1 to 4 of 4

calculating calender week from date by macro

  1. #1
    Registered User
    Join Date
    02-08-2021
    Location
    Brussels, Belgium
    MS-Off Ver
    2007
    Posts
    11

    calculating calender week from date by macro

    Hello,

    I want to write a table with date, day and calender week via macro. Always starting with the date its executed at.
    But the calculation for the calender week doesnt work for me, I got it from the basic search engine^^. I get values above 6000. Date and Day is working as its rather simple.

    This was my try:


    Can you tell me how to fix it?

    Best Regards
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-08-2021
    Location
    Brussels, Belgium
    MS-Off Ver
    2007
    Posts
    11

    Re: calculating calender week from date by macro

    I tried to post the code aswell, in case you dont want to download the file, but it tells me im not allowed to post any kind of link, video or image. Could that be some known bug?

  3. #3
    Registered User
    Join Date
    02-08-2021
    Location
    Brussels, Belgium
    MS-Off Ver
    2007
    Posts
    11

    Re: calculating calender week from date by macro

    Im sorry for posting this as an issue, but I found the problem, it was a simple input mistake B2 instead of C2.

    But maybe you have some suggestions to make that macro better?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: calculating calender week from date by macro

    If you change the order, have the code run week number at the end not in the middle.

+ 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] Userform, fill Textbox with calender week (ww) depending on date from another TextBox
    By crowmagnus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2020, 09:24 AM
  2. calculating month to date, year to date, week to date
    By labogola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2014, 05:21 AM
  3. Replies: 7
    Last Post: 05-02-2013, 06:48 AM
  4. Replies: 0
    Last Post: 01-21-2013, 08:46 AM
  5. [SOLVED] Retrieve first and last date of each week from monthly calender
    By SathishKumar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2012, 09:40 AM
  6. Create a week begining calender with custom week number
    By rds2472 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2009, 05:02 AM
  7. [SOLVED] Calculating a Date Based on Year, Week Number and Day of the Week
    By amy in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 11:42 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