+ Reply to Thread
Results 1 to 3 of 3

Macro Required to added week numbers to columns

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Macro Required to added week numbers to columns

    Hi,

    Every week I get sent a spreadsheet with the hours booked against specific codes, however, each weeks data is in a separate column (from weeks 1-52).

    What I require is a macro that will check the heading title of each weeks data e.g. WK01, WK02 etc, work out what week it is and input the week number in a new column (Week No) corresponding to that weeks data.

    Please see attached a sample spreadsheet for clarity.

    I would be most grateful for any assistance in this matter

    Many thanks in advance


    Regards


    Rob

    N.B. Excel version 2003
    Attached Files Attached Files
    Last edited by VBA Noob; 01-29-2009 at 09:17 AM.
    Rob

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro Required to added week numbers to columns

    If you will only have one value per row you can use a formula such as:

    Please Login or Register  to view this content.
    I used D:BC for 52 weeks.

    If you want this in VBA you will need to elaborate in terms of how you receive the data... ie insert column etc... it's all a little too vague I'm afraid.

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: [solved] Macro Required to added week numbers to columns

    DonkeyOte

    Many, many thanks for your prompt reply - the code works as required.

    Best regards


    Rob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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