Forum Discussion

Bartosz Szymański's avatar
Bartosz Szymański
Brass Contributor
Aug 03, 2017

Macro that makes pivot tables and sends them seperatly by outlook

Hi guys!
I have a big problem, I try to make macro that is gonna to make a pivot table(example in file) and then divides the sheet with table and send it by outlook(every table to specified person).
Pivot has to be just like in the example. I tried to do it by myself, but unfortunately when I record it(it's only way I can do macro) it breaks down and works only partly, additionly it works only one time cause it signs up mandatory sheet name and it doesnt open next time cause sheet of that number already exists, so in order to make it work i have to change sheet number every time in the code(and it wouldnt be wise to make this kind of macro). If you would like I can post my recorded code, but I think that somebody with knowledge will know how to make better version without it.

How its supposed to work? From the database macro sould filter data by "Dealer", than develop only for data included for this dealer a pivot table, exactly like one in example file, and finally send just the table to a certain person by outlook. Every suggestion and tip matter! Wish you all the best :)
Example of database(real one is much bigger please consider that) and pivot table included.

No RepliesBe the first to reply

Resources