I am in need of a script that can accomplish the following on a Excel Spread sheet:
1 - Open C:\myfile\myexcel.xls
2 - Create a new Worksheet called STATS
3 - Count column D for all unique items & place count at the 1st row of column D on
worksheet STATS (These are business source codes (non numeric))
The tricky part:
4 - Sum the total in column R (called sheet1) for each unque source code from the 1st worksheet, #3 was unique but for every unque source code the script found in column D I would like to know the total amount of revenue posted in column R associated to each source code (counting blanks, labeling as None) and place the total into the STATS worksheet:
COLUMNA COLUMN B COLUMNC COLUMND
SOURCE1 $TOTAL_REVENUE TOTALCOUNT TOTALUNIQUE
SOURCE2 $TOTAL_REVENUE TOTALCOUNT
SOURCE3 $TOTAL_REVENUE TOTALCOUNT
None $TOTAL_REVENUE TOTALCOUNT
5 - Save to the same file as above
6 - close excel
Thanks as always for your help, please note I need this to be a .VBS script not VBA, this will be used within a DOS Batch file for automation purposes.
Thank you again!