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

Hi

I have created a spreadsheet to monitor monthly income.

Col c col d col e col f col g col h col i
jan feb mar apr YTD qtr 1 qtr 2

While I have found it very easy to update and add a new month, also adding
the ytd formula which in this case sums col c to col f, I hit problems when
automating the entry of the qtr 1, qtr 2 formula.

In Jan the spreadsheet would look something like

Col c col d col e
jan YTD qtr 1

while in Feb

Col c col d col e col f
jan feb YTD qtr 1

thius is bad enough, but when I get to a new quarter, the whole issue
becomes even more complicated.

I would be really grateful if someone could help me get away from the clumsy
and repetative blocks of code, which basically decide which month it is and
either runs or moves on. I really need a clever loop,

Thanks in advance
Richard

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Monthly Update

The month is simply the column where YTD is minus 3. for example

Jan YTD is in column D = 4
Feb YTD is in column E = 5


So if YTD is in Row 1

set c = rows(1).find(what:="YTD", _
lookin:=xlvalues,lookat:=xlwhole)
MyMonth = c.column - 3

"Richard" wrote:

Hi

I have created a spreadsheet to monitor monthly income.

Col c col d col e col f col g col h col i
jan feb mar apr YTD qtr 1 qtr 2

While I have found it very easy to update and add a new month, also adding
the ytd formula which in this case sums col c to col f, I hit problems when
automating the entry of the qtr 1, qtr 2 formula.

In Jan the spreadsheet would look something like

Col c col d col e
jan YTD qtr 1

while in Feb

Col c col d col e col f
jan feb YTD qtr 1

thius is bad enough, but when I get to a new quarter, the whole issue
becomes even more complicated.

I would be really grateful if someone could help me get away from the clumsy
and repetative blocks of code, which basically decide which month it is and
either runs or moves on. I really need a clever loop,

Thanks in advance
Richard

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
HOW DO I UPDATE MONTHLY AVERAGES kimmiep Excel Worksheet Functions 1 December 10th 08 08:24 AM
Automatic update links to monthly file Hank Excel Discussion (Misc queries) 2 August 28th 08 05:01 PM
HOW DO I SET UP AN IF STATEMENT THAT WILL UPDATE MONTHLY DEVONA Excel Worksheet Functions 2 January 5th 08 09:28 AM
Excel Spreadsheet to Create/Update Monthly Calendar ATL10SPRO Excel Discussion (Misc queries) 1 March 14th 06 04:22 PM
Excel Spreadsheet to Create/Update Monthly Calendar ATL10SPRO Excel Worksheet Functions 1 March 14th 06 04:22 PM


All times are GMT +1. The time now is 09:18 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"