+ Reply to Thread
Results 1 to 6 of 6

Copy / Paste a Dynamic Range in Email

  1. #1
    Registered User
    Join Date
    01-04-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    2

    Copy / Paste a Dynamic Range in Email

    Ok so I am having a little difficulty figuring out how to do this so I though I would ask for help!

    I have a spreadsheet report I need to update daily and email the results. What I am looking for is a macro or VBA module that can do the following...

    Copy all the rows in a constant range that currently have data in them. The range will always be a constant - say A1:D300 for example. But sometimes the data will run through row 20, and other days through row 200. I need the VBA code to loop until it hits a blank row of data, and then it can stop. All the data will be consecutive so there won't ever be a situation where there is data on row 5, no data on row 6, then data again on row 7.

    Finally I need / would like the data to be pasted into the body of a new email, but not sent yet as I may need to update the daily subject line. However if it is possible to auto populate a distribution list stored in my contacts that would be beneficial (call it "DailyReport Distro").

    Any help would b MUCH appreciated!!

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Copy / Paste a Dynamic Range in Email

    i could help on this but it would be great if you provide sample workbook but still

    try the attached file (open & press ALt + F11 & then run macro )
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy / Paste a Dynamic Range in Email

    Naveed,

    This thread is 5 yrs old.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Copy / Paste a Dynamic Range in Email

    yes sir,

    i just filter unanswered thread and i thought to give response to this thread.

    sir guide me on this

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy / Paste a Dynamic Range in Email

    When you filter for unanswered threads, you can select upto maybe 2 weeks ago. Beyond that, the user is not likely to come back for a reply.

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Copy / Paste a Dynamic Range in Email

    Sure sir & thank you

    i will filter upto 2 Weeks ago only

+ 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