Help with Formula

M

Mjohnson

I know there has to be an easy way to do this. I have a
spreadsheet that I need to update on a weekly basis. All
the report weeks are in 1 column and they need to be
updated to increase by 1 each time I update the sheet.
Is there an easy way to write a macro to update the cell
to increase by 1.

Ex.
Field A Field B
Mail Date Report Week
05.14.04 3
03.31.04 9
03.17.04 11

I want it to update to 4, 10, and 12

Thanks!
 
D

David McRitchie

Hi MJohnson.........,
What about the data that is already in the spreadsheet
including the information in Column A.

To replace the numbers in Column B are there just 3 or do you
have a years worth.

Sub Mjohnson_Add1_toB()
Dim cell As Range
For Each cell In Columns("B:B").SpecialCells(xlConstants, xlNumbers)
cell = cell + 1
Next cell
End Sub

Since you posted something (blank question) in another newsgroup.
I'll include -- If not familiar with macros see
http://www.mvps.org/dmcritchie/excel/getstarted.htm

You can do this manually by typing a 1 into a cell , selecting it,
then copying it.
Then Selecting Column B, Edit, Paste Special, Add
 
Top