Monthly Update

R

Richard

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
 
J

joel

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
 

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

Top