+ Reply to Thread
Results 1 to 8 of 8

Printing based on current date

  1. #1
    Registered User
    Join Date
    02-24-2013
    Location
    USA
    MS-Off Ver
    16.63.1 (2022)
    Posts
    82

    Printing based on current date

    I have created a workbook that tracks all my accounts by week.
    Rows are account specific
    Columns are weeks

    I would like to have a macro that will print a snapshot report based on the current week where the report will print 6 weeks(columns) before the current week and 3 weeks(columns) after the current week. The current week columns should be 10% grey with left and right borders so that it is clearly delineated from the rest.

    I print this report almost daily.

    I have attached an example workbook and printout for reference.

    Thank you in advance for your time and aid.

    I had a previous thread posted to a different forum.
    https://www.excelforum.com/for-other...rent-date.html
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Printing based on current date

    Hi there,

    This seems interesting!

    Three questions:

    1. do you want to print an extract from only the "Global Cash" worksheet?

    2. do you want to print the worksheet extract directly, or do you want to export it to a PDF file?

    3. if there are fewer than six columns before the column which contains the current week, should any of them be hidden?

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    02-24-2013
    Location
    USA
    MS-Off Ver
    16.63.1 (2022)
    Posts
    82

    Re: Printing based on current date

    Thank you for your reply...

    1. It would be great to have the ability to print from the the sheets. But the priority is Global Cash.
    2. To print directly would be best
    3. If there are fewer than 6 columns before the current week, then print all the columns.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Printing based on current date

    Hi again,

    Thanks for that information.

    Another question - the PrintArea property of the "Global Cash" worksheet is set up to exclude rows from row 12 onwards, i.e. it ignores the "Disbursements Total" values in row 64. On the other worksheets, do you want to do the same thing and exclude rows from row 19 onwards?

    Regards,

    Greg M

  5. #5
    Registered User
    Join Date
    02-24-2013
    Location
    USA
    MS-Off Ver
    16.63.1 (2022)
    Posts
    82

    Re: Printing based on current date

    Sorry for my delay in responding.
    I exclude row 12 onwards so that the Fir 1 page by Page gives me the largest font size possible.
    I would Ike the print area in the subordinate sheets to include all values to the Total Disbursements Row.

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Printing based on current date

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.

    If you want to print immediately (rather than via Print Preview) just change the value of the following statement to False:

    Please Login or Register  to view this content.


    Conditional Formatting uses the following formula to highlight the column containing the data for the current week:

    Please Login or Register  to view this content.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-24-2013
    Location
    USA
    MS-Off Ver
    16.63.1 (2022)
    Posts
    82

    Re: Printing based on current date

    Thank you.
    It worked.
    I may have messed something up because the current week column is not greyed and bordered.

  8. #8
    Registered User
    Join Date
    02-24-2013
    Location
    USA
    MS-Off Ver
    16.63.1 (2022)
    Posts
    82

    Re: Printing based on current date

    My mistake. Let me place the conditional formatting. Please disregard the previous message.

+ 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] Printing based on Current Date
    By ara.darakjian in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-09-2020, 04:27 PM
  2. Printing based on Current Date
    By ara.darakjian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2020, 12:30 PM
  3. Dates Macro. Calculating date based on current date and input date
    By sachin20us in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2018, 09:29 AM
  4. [SOLVED] Finding the most current and previous current date based on multiple criteria
    By tkbuc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-27-2016, 06:06 PM
  5. Highlight Rows Based on Date Range Using Static Date and Current Date
    By SaraStravers in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-23-2015, 07:38 PM
  6. Calculate next due date based on start date frequency and current date
    By ironoverload in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-09-2014, 07:08 AM
  7. [SOLVED] Printing current time and date.
    By Channel3z in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2012, 03:46 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