Hello,

Wondering if someone can help me with a problem I am encountering or point me in the right direction. (searched before posting)

Want to record a macro that will update monthly totals. These monthly report pulls the data from another spreadsheet containing a pivot table. (equation shown below ) This pivot table is populated and updated monthly from data from a server.
----------------------------------------------------------------
Report structure: Months are in columns.

Jan | Feb| Mar| Apr| May|........
1
2
3

------------------------------------------------------------------
I want to know if there is a function that will allow me build a macro to vary the month which is a string, with out manually have to change the name 'Mar' to 'Apr'. This is the only obstacle.

Basic equation "total = (prev stock)+(new stock) - (sales)"

=B9
+ GETPIVOTDATA("Sum of Stock",'R:\Sales Spreadsheets\[Auto Import 2009.xls]Sheet1'!$B$38,"categ_cod","10","month","Mar")
- GETPIVOTDATA("Sum of sales",'R:\Sales Spreadsheets\[Auto Import 2009.xls]Sheet1'!$B$3,"categ_cod","10","month","Mar")


Thank you very much.