+ Reply to Thread
Results 1 to 13 of 13

edit a macro that will limit the range of cells being copied in the email body

  1. #1
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    edit a macro that will limit the range of cells being copied in the email body

    hi

    i am back and was wondering if somebody could help me... again..

    the attached macro is working fine. i just need somebody expert to edit the file such that the range of cells that will be copied in the email message is just column B-I (or even better if I can have the option just to add/delete columns I want in the macro like if I want just to copy B, D, H, I). Right now it is copying B-M in the message and I really do not need the extra columns. Also is it possible to include the explanation of your edited portion of the macro? so when I need to edit it again, I can do so by myself.

    last.... i need to recreate a 2nd "Send email" button which does the same thing but the only difference is that instead of reading the addresses in column V, it would consider column W?

    please... please... please..

    and i appreciate the time spent for this...
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    Any brilliant ideas from anybody?

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    Hi Melody

    Try the Code in the attached...you've got a lot going on but I believe it does as required. The Code MUST be run from the Buttons however you can put Break Points in the Code should you wish to step through the Code.

    I've done this as it was the easiest of your two options.
    the range of cells that will be copied in the email message is just column B-I
    The second option is probably doable but I've not looked at it.
    or even better if I can have the option just to add/delete columns I want in the macro like if I want just to copy B, D, H, I
    I've commented the Code for the changes I made.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    seems working fine.. thank you very much!!!!

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    You're welcome...glad I could help. Thanks for the Rep.

  6. #6
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    hello

    i tried using the macro with real data but i am having some problems when filters are applied... can you please take a look into it?
    i have attached the file....

    my filters are applied in H, I, S..

    hope anybody could help please?
    Attached Files Attached Files

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    Hi Melody

    I took a quick look at your attachment and it appears the immediate problem is you have empty Email Addresses. I'll look at it further tomorrow, probably later in the day. Have other responsibilities in the morning, early afternoon.

  8. #8
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    thanks jaslake... also if you would look into the body of the draft being created, it seems as if there are too many blank rows being copied... maybe you could do something about it...

    looking forward...

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    Hi Melody

    Give me an example of the Filters your using in H, I and S.

  10. #10
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    Hi Jaslake

    Please see attached in filtered form.

    I will always be filtered as = Open, Pending, In Progress
    S is filtered in = Not in Freaking SOP
    H = will be filtered 1 item at a time
    Attached Files Attached Files

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    Hi Melody

    The Code in the attached appears to do as you require. This File is the File you attached in Post #6.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: edit a macro that will limit the range of cells being copied in the email body

    seems working now... as always your code works great...
    thank you soo much.

    hope i could somehow repay you for all your help.

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: edit a macro that will limit the range of cells being copied in the email body

    You're welcome...glad I could help.

+ 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. VBA to select a Range of cells as Email Body In Outlook
    By TC922 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2013, 11:06 AM
  2. [SOLVED] Excel Macro To Create A New Email With A Range of Cells Included in the body
    By RickN85 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2012, 05:49 PM
  3. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  4. Posting Known Range of cells into Body of Email
    By RCrellin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2009, 07:13 AM
  5. Range of Cells to create body of email
    By Hahndo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2005, 02:05 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