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.
Msg = "Dear club member, " & vbNewLine & vbNewLine & _
" Please see below the dates and amounts you have contributed to date " & vbNewLine & vbNewLine & _
" Transaction " & Format(Sheets("Sheet1").Range("D" & i).Value, "MM/DD/YYYY") & " -- " & _
Format(Sheets("Sheet1").Range("C" & i).Value, "$#,##0.00; ($#,##0.00)") & " -- Original Contribution Received" & vbNewLine & _
" Transaction " & Format(Sheets("Sheet1").Range("F" & i).Value, "MM/DD/YYYY") & " -- " & _
Format(Sheets("Sheet1").Range("E" & i).Value, "$#,##0.00; ($#,##0.00)") & vbNewLine & _
" Transaction " & Format(Sheets("Sheet1").Range("H" & i).Value, "MM/DD/YYYY") & " -- " & _
Format(Sheets("Sheet1").Range("G" & i).Value, "$#,##0.00; ($#,##0.00)") & vbNewLine & _
" Transaction " & Format(Sheets("Sheet1").Range("J" & i).Value, "MM/DD/YYYY") & " -- " & _
Format(Sheets("Sheet1").Range("I" & i).Value, "$#,##0.00; ($#,##0.00)") & vbNewLine & _
'the line below is just to make the sum line under the dollar amounts line up
" _________" & vbNewLine & _
" " & Format(Sheets("Sheet1").Range("K" & i).Value, "$#,##0.00; (#,##0.00)") & " -- Total as of this date " & vbNewLine & vbNewLine & _
Is something like this what I should be doing??
IF
Format(Sheets("Sheet1").Range("F" & i).Value = "", (goto next)
else if
Format(Sheets("Sheet1").Range("H" & i).Value = "", (goto next)
else if
Format(Sheets("Sheet1").Range("J" & i).Value = "", (goto next)
End IF
" _________" & vbNewLine & _
" " & Format(Sheets("Sheet1").Range("K" & i).Value, "$#,##0.00; (#,##0.00)") & " -- Total as of this date " & vbNewLine & vbNewLine & _
Here is the current output from one:
Transaction 02/03/2011 -- $115.60 -- Original Contribution Received
Transaction 02/03/2012 -- $83.45
Transaction 02/15/2013 -- (67.70)
Transaction --
_________
$131.35 -- Total as of this date
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.
Bookmarks