+ Reply to Thread
Results 1 to 10 of 10

Email output variable

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Email output variable

    ok, Im stuck again. You guys were awesome last time and the help is much appreciated.

    I have a macro that creates an email that advises members when they have contributed funds or received a refund to/from the club. My spreadsheet headings are Email address, Name, 1st contribution, 1st date, 2nd cont, 2nd date, 3rd cont, 3rd date, 4th cont, 4th date. Refunds show as a negative number, despite it saying "contribution".

    What I dont want to happen is if someone contributed only 2 times, for the 3rd cont and date and 4th, etc, to print in the email... They have all made at least 1 contribution (Original Contribution Received).


    Here is the message part of the macro. I think it would just be a series of IF statements after the initial contribution, but not sure how to format it.

    Please Login or Register  to view this content.
    Is something like this what I should be doing??

    Please Login or Register  to view this content.
    Here is the current output from one:

    Please Login or Register  to view this content.
    Id rather not have the additional "Transaction --" and/or the space between the dollar amounts and the total if possible. Some people will only have 1 "transaction" and dollar amount.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: Email output variable

    I think it's a case of seeing the wood for the trees. I would suggest you build each of the transaction parts and then it's easier to see if you need the part and add it.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Email output variable

    Not sure what you mean. I will need it for some, but not others. Some people have 1 transaction, and some have 4. Some 2 and some 3.

    I guess I could break them into different sheets, Sheet1 with 1 transaction, Sheet2 with 2 transactions, etc, and copy the macro 4 times and delete the extra lines for each page...

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: Email output variable

    It would look something like this:

    Please Login or Register  to view this content.

    Regards, TMS

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: Email output variable

    Actually, I think this version aligns the positive and negative values a little better:

    Please Login or Register  to view this content.

    Regards, TMS

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: Email output variable

    @jlang11:

    I notice you have been on the board since I offered this solution. As I spent some time putting it together for you, I would be very interested to know if it worked and did what you hoped for.


    Regards, TMS

  7. #7
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Email output variable

    My apologies. I received an email alerting me there was a post and was anxious to see what it was, but due to the holiday I was not at my computer to test it. I should have some time very shortly to test it and I appreciate your effort. The code looks very intereting and I am anxious to see what it does. Ill post back in a few and let you know.

    Thanks again!

  8. #8
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Email output variable

    That works perfectly!!!! Thank you so much!!!!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: Email output variable

    You're welcome. Thanks for the rep.


    Please note the "i = 2" which is just in there for testing

  10. #10
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Email output variable

    Which worked out perfectly because I also had i = long (For i = 2 To LastRow) when it pulls the email address from column a.

    Thanks again!!

+ 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] Paste variable output (SQL Output) into a single cell.
    By fblaze in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2013, 06:24 AM
  2. Variable Print Output (display as well if possible)
    By Pherion in forum Excel General
    Replies: 2
    Last Post: 07-02-2012, 03:15 PM
  3. Using Match function output as a variable
    By iii in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2009, 06:01 PM
  4. Compare two email lists and output non-matching
    By Axle_Max in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-02-2009, 06:18 AM
  5. Do Loop with variable output
    By tubbsy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2008, 01:27 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