Hi All,
I have macro which creates a table and attaches it to an email. Is it possible to rearrange this data so that the table is essentially split into 2 tables, where the first part of the table show only the data from yesterdays date (column b), and then below this data there is a line that says "Running total" and then the data from all the other dates.
Here is the code:
Is this at all possible?
Thanks!
Tee
I have macro which creates a table and attaches it to an email. Is it possible to rearrange this data so that the table is essentially split into 2 tables, where the first part of the table show only the data from yesterdays date (column b), and then below this data there is a line that says "Running total" and then the data from all the other dates.
Here is the code:
Rich (BB code):
a = Range("a1:a200000")
b = Range("b1:b200000")
d = Range("d1:d200000")
m = Range("m1:m200000")
f = Range("f1:f200000")
g = Range("g1:g200000")
jk = Range("j1:j200000")
n = Range("n1:n200000")
count1 = 0
ebody1 = "" + "" + "Deal Title" + ""
For i = 2 To 200000
If j(i) = 0 And a(i, 1) <> "" And CStr(f(i, 1)) <> "" Then
count = 0
count1 = 0
count2 = 0
For k = 2 To 200000
If CStr(g(k, 1)) = CStr(g(i, 1)) And j(k) = 0 And a(k, 1) <> "" And CStr(f(i, 1)) <> "" Then
count = count + 1
count2 = count2 + 1
j(k) = 1
ebody = CStr(n(k, 1)) + "" + ebody
End If
Next
ebody = ebody1 + ebody + "
" + "Contract ID" + " " + "Refund Date" + " " + "Deal ID" + " " + "Voucher Code" + " " + CStr(g(k, 1)) + " " + CStr(b(k, 1)) + " " + CStr(m(k, 1)) + " " + CStr(jk(k, 1)) + "
<tbody>
</tbody>"
Is this at all possible?
Thanks!
Tee