Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with Formula

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Help with Formula

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
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Mjohnson" wrote in message ...
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"