+ Reply to Thread
Results 1 to 5 of 5

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 worksheet where the columns are the weeks of the year startign with each sunday and the rows are various receipts and expense items.

    Is there a way to have excel automatically set up the print range to be the 8 columns before the current week and the 4 columns after the current?

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Printing based on Current Date

    We need a sample workbook to give you the most accurate response.

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Lewis

  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

    see attached

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Printing based on Current Date

    I just noticed that your question was for Mac. I do not have access to Mac, but I used generic VBA code which may work. If it does not work, I suggest you wait a couple of days, and repost your question in a new thread, but mark this question as solved, and put a reference in the new thread to your original thread, so you don't get yelled at by the ExcelForum moderators.

    Mac VBA reference: https://www.techonthenet.com/excel/m...editor2011.php

    NOTE:
    a. Sheet 'Global Cash' had data on row 62. Instead of using 'Last Row' I looked for 'Increase/Decrease'.
    b. Your sample shows this week as starting August 2, 2020. Today is August 8, the last day of that week. Just so you realize that a new week starts tomorrow.

    Try the following code in the attached modified copy of your Excel file:
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Lewis

  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

    Thank you.
    It did not seem to work.
    I will report after a few days.

+ 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. 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
  2. [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
  3. 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
  4. 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
  5. Auto Collapse/Expand a Date Pivot table based on current date
    By Dave27 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-03-2013, 12:24 PM
  6. [SOLVED] To count the number of rows based on date and check how old the row is from current date.
    By raovv in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-04-2013, 11:45 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