A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

creating template



 
 
Thread Tools Display Modes
  #1  
Old April 27th 06, 12:14 PM posted to microsoft.public.excel.programming
enyaw
external usenet poster
 
Posts: 108
Default creating template

I am creating a template to calulate information that is downloaded from
another program. The information is downloaded into different sheets and i
need to do lookups to bring the information into one sheet. The problem i
have is that there are subtotals to be placed on the sheet but the
information is not always in the same format. In one download there may be
four items to calculate while in another download there may be only three.
Is there any programming I can use to calculate the subtotals once all the
items are in place?

Thanks
  #2  
Old April 27th 06, 12:23 PM posted to microsoft.public.excel.programming
NickHK
external usenet poster
 
Posts: 4,391
Default creating template

enyaw,
Does the Data>Subtotals achieve your goal ?

NickHK

"enyaw" > wrote in message
...
> I am creating a template to calulate information that is downloaded from
> another program. The information is downloaded into different sheets and

i
> need to do lookups to bring the information into one sheet. The problem i
> have is that there are subtotals to be placed on the sheet but the
> information is not always in the same format. In one download there may

be
> four items to calculate while in another download there may be only three.
> Is there any programming I can use to calculate the subtotals once all the
> items are in place?
>
> Thanks



  #3  
Old April 27th 06, 12:40 PM posted to microsoft.public.excel.programming
enyaw
external usenet poster
 
Posts: 108
Default creating template

The info is dowloaded into other sheets. The main sheet uses lookups to
gather all the info together to calculate it.
e.g.
Part No Seq No Description Labour Material Total
1111 2 printer 10 15
25
1112 2 welder 15 10
25
Subtotal 25 25
50

The only thing i type in is the Part no and the rest is picked up by lookups
When i have all the items in that sequence inputted i need to be able to do
a subtotal on them automatically.

"NickHK" wrote:

> enyaw,
> Does the Data>Subtotals achieve your goal ?
>
> NickHK
>
> "enyaw" > wrote in message
> ...
> > I am creating a template to calulate information that is downloaded from
> > another program. The information is downloaded into different sheets and

> i
> > need to do lookups to bring the information into one sheet. The problem i
> > have is that there are subtotals to be placed on the sheet but the
> > information is not always in the same format. In one download there may

> be
> > four items to calculate while in another download there may be only three.
> > Is there any programming I can use to calculate the subtotals once all the
> > items are in place?
> >
> > Thanks

>
>
>

  #4  
Old April 27th 06, 01:03 PM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 6,953
Default creating template

If you only will have one part number at any one time, just put in sum
formulas that address the largest amount of data that you will retrieve.

You can hide intervening blank rows if you need to print a report.

--
Regards,
Tom Ogilvy


"enyaw" wrote:

> The info is dowloaded into other sheets. The main sheet uses lookups to
> gather all the info together to calculate it.
> e.g.
> Part No Seq No Description Labour Material Total
> 1111 2 printer 10 15
> 25
> 1112 2 welder 15 10
> 25
> Subtotal 25 25
> 50
>
> The only thing i type in is the Part no and the rest is picked up by lookups
> When i have all the items in that sequence inputted i need to be able to do
> a subtotal on them automatically.
>
> "NickHK" wrote:
>
> > enyaw,
> > Does the Data>Subtotals achieve your goal ?
> >
> > NickHK
> >
> > "enyaw" > wrote in message
> > ...
> > > I am creating a template to calulate information that is downloaded from
> > > another program. The information is downloaded into different sheets and

> > i
> > > need to do lookups to bring the information into one sheet. The problem i
> > > have is that there are subtotals to be placed on the sheet but the
> > > information is not always in the same format. In one download there may

> > be
> > > four items to calculate while in another download there may be only three.
> > > Is there any programming I can use to calculate the subtotals once all the
> > > items are in place?
> > >
> > > Thanks

> >
> >
> >

  #5  
Old April 27th 06, 01:17 PM posted to microsoft.public.excel.programming
enyaw
external usenet poster
 
Posts: 108
Default creating template

I need to input the subtotals automatically. Is there a way of inputting the
subtotal row via programming and add it to a command button. I need to know
if there is a way to input the subtotal from the cell that the cursor is in.

"NickHK" wrote:

> enyaw,
> Does the Data>Subtotals achieve your goal ?
>
> NickHK
>
> "enyaw" > wrote in message
> ...
> > I am creating a template to calulate information that is downloaded from
> > another program. The information is downloaded into different sheets and

> i
> > need to do lookups to bring the information into one sheet. The problem i
> > have is that there are subtotals to be placed on the sheet but the
> > information is not always in the same format. In one download there may

> be
> > four items to calculate while in another download there may be only three.
> > Is there any programming I can use to calculate the subtotals once all the
> > items are in place?
> >
> > Thanks

>
>
>

  #6  
Old April 27th 06, 01:30 PM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 6,953
Default creating template

Private sub commandbutton1_Click()
activecell.FormulaR1C1 = "=Subtotal(9,R2C:R[-1]C)"
end Sub

the R2C says to start the sum in Row 2 of the same column as the formula.
Adjust the 2 to reflect the start of your data.

--
Regards,
Tom Ogilvy


"enyaw" wrote:

> I need to input the subtotals automatically. Is there a way of inputting the
> subtotal row via programming and add it to a command button. I need to know
> if there is a way to input the subtotal from the cell that the cursor is in.
>
> "NickHK" wrote:
>
> > enyaw,
> > Does the Data>Subtotals achieve your goal ?
> >
> > NickHK
> >
> > "enyaw" > wrote in message
> > ...
> > > I am creating a template to calulate information that is downloaded from
> > > another program. The information is downloaded into different sheets and

> > i
> > > need to do lookups to bring the information into one sheet. The problem i
> > > have is that there are subtotals to be placed on the sheet but the
> > > information is not always in the same format. In one download there may

> > be
> > > four items to calculate while in another download there may be only three.
> > > Is there any programming I can use to calculate the subtotals once all the
> > > items are in place?
> > >
> > > Thanks

> >
> >
> >

  #7  
Old April 27th 06, 01:47 PM posted to microsoft.public.excel.programming
enyaw
external usenet poster
 
Posts: 108
Default creating template

Is there a way of getting this formula to use the active cell as a reference
to the row that needs the subtotal formula instead of having to type it in in
the program?

"Tom Ogilvy" wrote:

> Private sub commandbutton1_Click()
> activecell.FormulaR1C1 = "=Subtotal(9,R2C:R[-1]C)"
> end Sub
>
> the R2C says to start the sum in Row 2 of the same column as the formula.
> Adjust the 2 to reflect the start of your data.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "enyaw" wrote:
>
> > I need to input the subtotals automatically. Is there a way of inputting the
> > subtotal row via programming and add it to a command button. I need to know
> > if there is a way to input the subtotal from the cell that the cursor is in.
> >
> > "NickHK" wrote:
> >
> > > enyaw,
> > > Does the Data>Subtotals achieve your goal ?
> > >
> > > NickHK
> > >
> > > "enyaw" > wrote in message
> > > ...
> > > > I am creating a template to calulate information that is downloaded from
> > > > another program. The information is downloaded into different sheets and
> > > i
> > > > need to do lookups to bring the information into one sheet. The problem i
> > > > have is that there are subtotals to be placed on the sheet but the
> > > > information is not always in the same format. In one download there may
> > > be
> > > > four items to calculate while in another download there may be only three.
> > > > Is there any programming I can use to calculate the subtotals once all the
> > > > items are in place?
> > > >
> > > > Thanks
> > >
> > >
> > >

  #8  
Old April 28th 06, 12:55 AM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 27,285
Default creating template

It puts the formula in the activecell - as you asked.

--
Regards,
Tom Ogilvy

"enyaw" > wrote in message
...
> Is there a way of getting this formula to use the active cell as a

reference
> to the row that needs the subtotal formula instead of having to type it in

in
> the program?
>
> "Tom Ogilvy" wrote:
>
> > Private sub commandbutton1_Click()
> > activecell.FormulaR1C1 = "=Subtotal(9,R2C:R[-1]C)"
> > end Sub
> >
> > the R2C says to start the sum in Row 2 of the same column as the

formula.
> > Adjust the 2 to reflect the start of your data.
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "enyaw" wrote:
> >
> > > I need to input the subtotals automatically. Is there a way of

inputting the
> > > subtotal row via programming and add it to a command button. I need

to know
> > > if there is a way to input the subtotal from the cell that the cursor

is in.
> > >
> > > "NickHK" wrote:
> > >
> > > > enyaw,
> > > > Does the Data>Subtotals achieve your goal ?
> > > >
> > > > NickHK
> > > >
> > > > "enyaw" > wrote in message
> > > > ...
> > > > > I am creating a template to calulate information that is

downloaded from
> > > > > another program. The information is downloaded into different

sheets and
> > > > i
> > > > > need to do lookups to bring the information into one sheet. The

problem i
> > > > > have is that there are subtotals to be placed on the sheet but the
> > > > > information is not always in the same format. In one download

there may
> > > > be
> > > > > four items to calculate while in another download there may be

only three.
> > > > > Is there any programming I can use to calculate the subtotals once

all the
> > > > > items are in place?
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Template (Creating a Function in the template) Té Excel Worksheet Functions 3 March 6th 09 07:17 AM
Creating a Template newguy Excel Discussion (Misc queries) 2 November 10th 08 08:03 PM
Creating a template with excel Tired of Setbacks Excel Discussion (Misc queries) 3 October 12th 07 03:35 PM
template creating Div. F-II Excel Discussion (Misc queries) 2 February 10th 06 02:19 PM
Creating a template in Excel? KGreen Excel Discussion (Misc queries) 1 September 21st 05 05:46 PM


All times are GMT +1. The time now is 10:16 AM.


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