PDA

View Full Version : Excel macro/VBA to sort a column, upload to sharepoint and save as draft on outlook



nveenrv
02-20-2013, 11:46 PM
Hi,

I'm relatively new to Excel macros. I'd like some help with the following tasks, which I'm trying to automate using excel macros.

Consider the data below:

Col1 Col2
A A1
B A2
C A3
D A3
E A1
F A1

1.) First, I'd like to have the data in column B sorted in order (ascending) and then the rows rearranged. Ideally, this would be:

Col1 Col2
A A1
E A1
F A1
B A2
C A3
D A3

2.) The data would need to be grouped as per unique values in column 2, and each group would have to be saved as a different excel sheet, with the filename being the unique name in column 2. In this example, the values A, E, F for A1 in column 2, would need to be saved in a new excel sheet with the filename A1.xlsx. Similarly, there would be excel spreadsheets named A2.xlsx and A3.xlsx.


3.) The individual spreadsheets will need to be uploaded to microsoft sharepoint, and each sharepoint link (for each spreadsheet) will have to be added as draft in an email in microsoft outlook. In the above example, 3 different spreadsheets (A1.xlsx, A2.xlsx, A3.xlsx) would be uploaded to sharepoint and the individual link will be added to three emails in microsoft outlook and saved as "draft".

I'm would like to accomplish all of this automation through excel macros. It'd be great if someone can help with any/all of the above 3 points. Thanks in advance.