+ Reply to Thread
Results 1 to 3 of 3

Making an email from sheet cells without the blank cells and email this content

  1. #1
    Registered User
    Join Date
    02-06-2018
    Location
    Drunen
    MS-Off Ver
    2010
    Posts
    8

    Making an email from sheet cells without the blank cells and email this content

    Goodday,

    My project is an excel-sheet where I every day manually put data in about the loading an unloading information for these 2 trucks.
    I want to make 3 times a day an update of the way the trucks have load or unload there cargo's at the customer. In my sheet "customer" I have in columns A1 the tekst.
    In (Yellow) columns B,E,H stands the data of the driver Carlos what he is doing this day. What he has deliver at these 3 update times that day and what the situation is on these 3 update times.


    I have to make a code that wil now put all the information from column B, Cells B1 to B32 in my email body. But the cells B23 to B32 contains no information at the specific update time 07:45 of my driver Carlos.
    What i want is that when I run the code that the code looks at column B from cell B1 to cell B32 and sees which cell of the "B" colomn contains data. If there is NO data in colomn "B" at a row then there must be no copying of that cell information to my email body. e.g. the cell B23 is empty, than also the information of cell "A23" must not be copy to my email body.
    The only information of cells in colomn "B" what I want for myself to put in the email body must be also free to choose.

    I have also upload an image how the email must look like and the image of my "customer"-sheet.

    Hopefully someone can help me out with this code what I have found here on this forum and trying to get it work for my project.
    I have also the problem that I can not pick the cells in my sheet and put it in the vba code make anymore cells A31 and B31 & A32 and B32. I have in my code to many vbnewline 's. There must be another way to do what I want.

    The code sofar:

    12-2-2018 23-28-59.jpg
    12-2-2018 23-41-06.jpg

    Please Login or Register  to view this content.
    Last edited by pa3ewc; 02-13-2018 at 03:38 AM.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Making an email from sheet cells without the blank cells and email this content

    pa3ewc, welcome to the forum.

    Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Please amend your first post so we can continue to help you. TY
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    02-06-2018
    Location
    Drunen
    MS-Off Ver
    2010
    Posts
    8

    Re: Making an email from sheet cells without the blank cells and email this content

    Hello Bakerman2,

    Thanks for your information and explanation. I have now put the code in a window for testing I think.
    I want to make an update at 07:45, 11:30 and 14:30 every day for the 2 trucks column "B" and "C" + "E" and "F" + "H" and "I". So I need also 3 buttons in my sheet with tekst "Update 07:45" / "Update 11:30" / "Update 14:30.
    Just what I have explain in my previous thread. For colomn "F" I need the layout of the email but than the cells F14 and F15.

    So in the email body must stand for the update at 11:30:

    CT-2: Truck 1111 + Trailernr 789 - Mike (Driving time left: 04.00 - Start today at: 07.00) - Empty pallets: 0

    (The LOADING: information in my sheet is not correct for Mike at 11:30. The cells "F14" + "F15" must be empty.)! Need just the UNLOADING information...

    UNLOADING:
    1) be-1234
    2) be-5678

    Also the update of the situation of Carlos at 11:30. So I want a overview in this email body of these two drivers at a time (07:45, 11:30 and 14:30).
    If necessary I must klik on the button of the updatetime and it must generate the email with the information of these 2 drivers.

    It would be great if the data of the cells from colomn "H" + "I" at 14:30 with a button clears the sheet and sets these 2 columns at 07:45 for the next day to begin in the sheet. Because if they have not deliver all the cargo's at the end of that day.....the must start with this the next day. Is that also possible to make.?

    Can you help me out with some explanation an rearranged my code. So I have then a start how it can be and that I can experiment further for myself with your code to look what also be handsome to have.

    Thanks for your time...
    Last edited by pa3ewc; 02-13-2018 at 04:21 AM.

+ 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. Replies: 7
    Last Post: 11-25-2016, 07:59 PM
  2. code to paste the content of specific cells into the email generated by VBA
    By garfen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2015, 07:28 PM
  3. [SOLVED] Createing Email from Userform - Body of email contain content from textbox
    By honger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2014, 08:44 PM
  4. Replies: 5
    Last Post: 09-28-2013, 04:32 AM
  5. Skipping blank cells in Email body
    By bocaj315 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2013, 12:19 PM
  6. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  7. Replies: 0
    Last Post: 04-07-2009, 04:42 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