+ Reply to Thread
Results 1 to 5 of 5

Header Date Range

  1. #1
    Registered User
    Join Date
    05-27-2010
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2010
    Posts
    51

    Header Date Range

    I have several worksheets that all have similar headers. In the header, on the left margin is the title of the worksheet, which is a static value. On the right margin I have a date range, which needs to be changed weekly.

    I understand Excel has the feature where you can include "&[Date]" and it will auto-update based on the current date, however I'm looking for a range. To be more specific, the report will be updated every Monday morning, and will pull in the last week's data (Sunday to Sunday).

    Ideally the format would be mm/dd/yyyy - mm/dd/yyyy.

    Any thoughts on how I can auto-magically make this happen? Thanks.

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

    Re: Header Date Range

    You can set the header/footer to reference the value of a cell that contains
    your formula. For example:

    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    05-27-2010
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Header Date Range

    Argh! I have been fooling around with your suggestion for the past 30 minutes and can't get it to operate. I really wish I knew VBA better.

    I was hoping you might be able to show me the application in a sample workbook. I am attaching a sample for you to execute the code. If you could please update as you mentioned, then maybe I could see exactly how you do it.

    Sorry for being a noob on VBA, but this is driving me crazy.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Header Date Range

    testing
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    05-27-2010
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Header Date Range

    So I shared this problem with a friend, and he suggested I under a different code snippet. However it seems much more complicated. Any suggestions?

    The reference cell is in Trigger! B2.

    Please Login or Register  to view this content.

+ 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