Excel Excel 2007 Macro/VB Help

Joined
Apr 1, 2010
Messages
1
Reaction score
0
I am pretty much a beginner with using Excel for anything other than simple sums, but I now have a budget spreadsheet to work on. I need a macro that will update a simple sum formula eg =SUM(B2:O2) to include the next adjacent column, eg =SUM(B2:p2). I have recorded a macro that does that, and extends the formula change to the rest of the column, but I need to do this every month, to include the next column.
The spreadsheet is roughly like this:

Jan Feb March April May June Total To Date Projected Total
Salary1
Salary2
Salary3

Every month I have to update the Total to Date column to include the past month. At the moment all my macro does is extend the formula to a specific column (March) and that's it, rendering it useless for next month. Is my only option to record a new macro every month, or is there VB language to indicate the next adjacent column, rather than a specific column?
Apologies if this is a very simplistic question - I just feel sure there's a way of doing this that I just don't know about yet!
Thanks for any advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Sumproduct 0
Excel VBA 1
Excel Excel: sum of 7 cells (weeks) in every row of a spreadsheet 1
Excel EXCEL - using a date dependant formula to hide rows 3
Excel Help with dates 2
Excel Excel Macro formula when number of records may vary 0
Access Query problem 1
Excel Excel Macro - Variable in a formula 1

Top