trying to create a blow-up sheet by writing a VBA macro

G

Guest

Hello I am trying to create a blow-up sheet by writing a VBA macro that shows
the initial cost buy of an item then for a range of years, the Maintenance
cost for each year.
e.g.
PC Cost by is $2000 bought on 4/2005 and for the next 4 years the
maintanence cost is $100 per year.
so it should appear as:

PC $2000 4/2005
PCmaint $100 4/2006
PCmaint $100 4/2007
PCmaint $100 4/2008
PCmaint $100 4/2009

I imagine it will be a FOR or WHILE with some ARRAY type variable

Thanks
 
G

Guest

The answer to your question depends very much on where the source data is,
how it is arranged, etc. Need more detail to be of help, I'm afraid.
 
G

Guest

Hello K Dales, I hope this helps so here it goes
The Data is entered into a Contract Input sheet as (start and end dates are
start and end of the contract) follows:

QTY ITEM CostBuy CostofMaintenance(per Yr) Startmonth/Yr Endmonth/yr
5 PC $2000 $100 5/2005
6/2009


The following is a rough algorithm of calculating the Buy Cost and the
maintenance

CostToBuy = CostBuy * QTY then

' For MaintYear = ActualStartDate To ActualEndDate
' Cost Maint * QTY * (ActualStartDate)
' + (["Desktop HW Input" sheet] Contract Structure
' + ["Desktop HW Input" sheet] Maint End)
' next i


The first line(Row) that will be output will be the "Cosbuy" as follows:

PC - Buy $2000

The next lines shout output as:
PC-Maint $100 5/2006
PC-Maint $100 5/2007
PC-Maint $100 5/2008
PC-Maint $100 5/2009

I hope this makes sense signed desperate and confused!!!
 

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