I have three if functions but I don't want them to exlude each other.
Example:
ReportArray(5, Mailcounter) = 1
ReportArray(11, Mailcounter) = 0
ReportArray(17, Mailcounter) = 1
The above example should include the four first .HTMLBody and the the last four .HTMLBody
Code
If ReportArray(5, Mailcounter) > 0 Then
.HTMLBody = .HTMLBody & "<p style='font-family:Calibri, sans-serif;font-size:18'><B><U>" & "3.2.3-3.2.4 Landscaping & Irrigation System" & "</U></B></p>"
.HTMLBody = .HTMLBody & "<ul><li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "You currently have " + "<U>" & ReportArray(3, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in ""3.2.3-3.2.4 Landscaping & Irrigation System"" out of " + "<U>" & ReportArray(5, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in Landscaping & Irrigation System as a total." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "With regards to our data, ""3.2.3-3.2.4 Landscaping & Irrigation System"" are supposed to have " + "<U>" & Format(ReportArray(7, Mailcounter), "0.0 %") & "</U>" & " of the total Landscaping & Irrigation System." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "We would therefore like you to confirm whether this is true - and if yes, allocate " & ReportArray(8, Mailcounter) & " to ""Landscaping & Irrigation System - SBTB"" in your input sheet." & "</p></li></ul>"
If ReportArray(11, Mailcounter) > 0 Then
.HTMLBody = .HTMLBody & "<p style='font-family:Calibri, sans-serif;font-size:18'><B><U>" & "3.2.11 Interior Plant and Tree Maintenance" & "</U></B></p>"
.HTMLBody = .HTMLBody & "<ul><li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "You currently have " + "<U>" & ReportArray(9, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in ""3.2.11 Interior Plant and Tree Maintenance"" out of " + "<U>" & ReportArray(11, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in Interior Plant and Tree Maintenance as a total." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "With regards to our data, ""3.2.11 Interior Plant and Tree Maintenance"" are supposed to have " + "<U>" & Format(ReportArray(12, Mailcounter), "0.0 %") & "</U>" & " of the total Interior Plant and Tree Maintenance." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "We would therefore like you to confirm whether this is true - and if yes, allocate " & ReportArray(13, Mailcounter) & " to ""Landscaping & Irrigation System - SBTB"" in your input sheet." & "</p></li></ul>"
If ReportArray(17, Mailcounter) > 0 Then
.HTMLBody = .HTMLBody & "<p style='font-family:Calibri, sans-serif;font-size:18'><B><U>" & "3.3.10 Interior Pest Control" & "</U></B></p>"
.HTMLBody = .HTMLBody & "<ul><li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "You currently have " + "<U>" & ReportArray(15, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in ""3.3.10 Interior Pest Control"" out of " + "<U>" & ReportArray(17, Mailcounter) & " " & CurrencySheet.Range("A" & CountryCurrency) & "</U>" + " in Interior Pest Control as a total." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "With regards to our data, ""3.3.10 Interior Pest Control"" are supposed to have " + "<U>" & Format(ReportArray(19, Mailcounter), "0.0 %") & "</U>" & " of the total Interior Pest Control." & "</p></li>"
.HTMLBody = .HTMLBody & "<li><p style='font-family:Calibri, sans-serif;font-size:16'>" & "We would therefore like you to confirm whether this is true - and if yes, allocate " & ReportArray(20, Mailcounter) & " to ""Landscaping & Irrigation System - SBTB"" in your input sheet." & "</p></li>"
End If
End If
End If
Aucun commentaire:
Enregistrer un commentaire