mikes6058
asked on
change to macro coding to send multiple lines
HI
Attached is a spreadsheet with a number of rows containing basic trading terms for a number of companies (made up). Column T contains an email address.
The button on the sheet has a macro assigned to it which is designed to split the top row of headings and each individual separate row and then send those two rows to the relevant email address in column T in a separate excel worksheet.
However I would like to alter the macro so that if the same email address appears in multiple rows then each of these rows is collated together along with the top row of column headings into one spreadsheet and then sent as one email attachment to that email address.
Based on the example (example sheet) attached I would expect a workbook containing the following to be sent to robmarr789@gmail.com (1 email to be sent only)
Would anyone be able to alter the coding in the macro to this?
Thanks Rob
Copy-of-DIRECT-Central-Terms-encrypted.x
Attached is a spreadsheet with a number of rows containing basic trading terms for a number of companies (made up). Column T contains an email address.
The button on the sheet has a macro assigned to it which is designed to split the top row of headings and each individual separate row and then send those two rows to the relevant email address in column T in a separate excel worksheet.
However I would like to alter the macro so that if the same email address appears in multiple rows then each of these rows is collated together along with the top row of column headings into one spreadsheet and then sent as one email attachment to that email address.
Based on the example (example sheet) attached I would expect a workbook containing the following to be sent to robmarr789@gmail.com (1 email to be sent only)
Would anyone be able to alter the coding in the macro to this?
Thanks Rob
Copy-of-DIRECT-Central-Terms-encrypted.x
I could not find a macro
ASKER
see attached
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's brilliant, exactly what I wanted it to do.
Now I need exactly the same code to be applied to the attached sheet only with the following differences....
1. Only send columns in the range A:W - do not include any columns after this.
2. Change it so it sends to the email address in column W
3. Do not collate and send rows where column X contains (RESOLVED) or column Y contains (INTERNAL QUERY)
Thanks
Master-Query-Log.xlsm
Now I need exactly the same code to be applied to the attached sheet only with the following differences....
1. Only send columns in the range A:W - do not include any columns after this.
2. Change it so it sends to the email address in column W
3. Do not collate and send rows where column X contains (RESOLVED) or column Y contains (INTERNAL QUERY)
Thanks
Master-Query-Log.xlsm
I think for condition 3 a different approach should be adopted. You should open a new question.
ASKER
Excellent solution.
I have opened a new question for the next steps (see below).
https://www.experts-exchange.com/questions/28656182/macro-to-send-certain-range-and-to-filter-depending-on-value.html
I have opened a new question for the next steps (see below).
https://www.experts-exchange.com/questions/28656182/macro-to-send-certain-range-and-to-filter-depending-on-value.html
ASKER
Great work