+ Reply to Thread
Results 1 to 9 of 9

Create pdf from excel with specific range and today's date data

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    7

    Create pdf from excel with specific range and today's date data

    He there,

    Can somebady help me to change this vba or create new one. I want to create daily report with specific range and select data from colummn based on todays date.
    I attached image of my schedule.
    This is my vba to create monthly report.

    Please Login or Register  to view this content.
    Administrator's note: Please take the time to review our rules. There aren't many, and they are all important. Our guidelines recommend code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Attached Images Attached Images
    Last edited by 6StringJazzer; 08-10-2024 at 10:54 AM. Reason: please use code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,724

    Re: Create pdf from excel with specific range and today's date data

    Please attach your actual Excel file so we can run, update, and test your code. Thanks. See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    7

    Re: Create pdf from excel with specific range and today's date data

    Find atached excel macro enabled workbook.
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,724

    Re: Create pdf from excel with specific range and today's date data

    If I understand correctly, you do not need any VBA changes to do this. I provided formulas to populate the table based on today's date, and also applied the same conditional formatting rules to the day's data.

    I also adjusted your day-of-week to be the date formatted as ddd rather than a formula converting it to text. I made the corresponding change in your conditional formatting to use the day-of-week number rather than the text for the day name.

    Also I strongly recommend against using merged cells.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    7

    Re: Create pdf from excel with specific range and today's date data

    Thank you very much StringJazzer for providing your formula.
    I have 12 worksheets, one for each month, and I want to send as pdf only daily report. To send monthly report I use vba code that I provided on first post. To send daily report with your idea, i must create other 12 sub sheets, get data with your formula from main sheet. VBA code will be more usefull for me.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,724

    Re: Create pdf from excel with specific range and today's date data

    I have 12 worksheets, one for each month
    This was not evident from the file you attached.

    What is the daily report you want to send? Is it that table in the lower part of sheet? Will you have that on every sheet?

    I recommend you have one sheet with the daily report, build it with formulas, and the VBA can generate the PDF and mail it, if that's what you need to do. But first I need to know what your report looks like.

  7. #7
    Registered User
    Join Date
    11-21-2013
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    7

    Re: Create pdf from excel with specific range and today's date data

    My report loooks like table that in the lower part of sheet. This report I want to generate and send with vba, from table in the Upper part of the sheet.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,724

    Re: Create pdf from excel with specific range and today's date data

    Go to sheet Daily Report and click Send to PDF. It will refer to the correct month sheet when month is not August, if that sheet exists.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-21-2013
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    7

    Re: Create pdf from excel with specific range and today's date data

    Thank you very much 6StringJazzer. I tested and it works very good.
    I wish you good health and all the best in life.

+ 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] How to fetch data according to today from a date range
    By akshay6s in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-28-2020, 12:48 AM
  2. Establish range for # of days a case has been open via create date and today's date
    By excelingtoexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2020, 11:54 AM
  3. [SOLVED] trying VBA code to get specific data for unique IDs on specific date from date range
    By Roshan.Shakya in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2019, 06:16 AM
  4. Replies: 2
    Last Post: 12-31-2012, 12:47 PM
  5. [SOLVED] VBA to copy specific data from one workbook to another based on today's date?
    By hiprhit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2012, 02:21 PM
  6. Formula to search for today's date and return range of data
    By paramore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2012, 02:17 PM
  7. create today date line in excel gantt chart
    By omneo in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-13-2010, 10:25 AM

Tags for this Thread

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