Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default trying to create a blow-up sheet by writing a VBA macro

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default trying to create a blow-up sheet by writing a VBA macro

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.

"DONO" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default trying to create a blow-up sheet by writing a VBA macro

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!!!

"K Dales" wrote:

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.

"DONO" wrote:

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

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
Help with writing a macro to create a list Wombat Excel Discussion (Misc queries) 1 February 3rd 10 03:18 PM
Macro to create new sheet Kim Excel Discussion (Misc queries) 5 April 25th 09 02:51 AM
Blow ups in spread sheet hmz Excel Worksheet Functions 2 August 18th 06 01:17 AM
it's going to blow! el_peacock Excel Programming 1 December 15th 04 05:59 PM
How to create a Macro to Copy Information in one sheet to another sheet. poppy Excel Programming 3 July 28th 04 07:26 AM


All times are GMT +1. The time now is 06:48 PM.

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

About Us

"It's about Microsoft Excel"