PC Review


Reply
Thread Tools Rate Thread

Create Summary then export

 
 
=?Utf-8?B?RnJlZGR5?=
Guest
Posts: n/a
 
      15th Nov 2007
I have a table of columns, some titles, others costs.

Think I may need to email the files to someone to better demonstrate it.

Is it possible to create a macro button that will create an additional sheet
that summarises all the headings in column 1 and sums their respective costs

Then another button on the new sheet that will export the data into a
template in their correct columns.

I would greatly appreciate anyone's help


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGF1bFc=?=
Guest
Posts: n/a
 
      15th Nov 2007
Make sure the columns have headers and create a Pivot Table? Or do you mean
something else?

"Freddy" wrote:

> I have a table of columns, some titles, others costs.
>
> Think I may need to email the files to someone to better demonstrate it.
>
> Is it possible to create a macro button that will create an additional sheet
> that summarises all the headings in column 1 and sums their respective costs
>
> Then another button on the new sheet that will export the data into a
> template in their correct columns.
>
> I would greatly appreciate anyone's help
>
>

 
Reply With Quote
 
=?Utf-8?B?RnJlZGR5?=
Guest
Posts: n/a
 
      15th Nov 2007
Yeah I mean something that is automated.

I am trying to build a template that will be sent out to various people all
year round for population.

The macro buttons are to speed things up for them as they seem incapable of
doing anything themselves.

"PaulW" wrote:

> Make sure the columns have headers and create a Pivot Table? Or do you mean
> something else?
>
> "Freddy" wrote:
>
> > I have a table of columns, some titles, others costs.
> >
> > Think I may need to email the files to someone to better demonstrate it.
> >
> > Is it possible to create a macro button that will create an additional sheet
> > that summarises all the headings in column 1 and sums their respective costs
> >
> > Then another button on the new sheet that will export the data into a
> > template in their correct columns.
> >
> > I would greatly appreciate anyone's help
> >
> >

 
Reply With Quote
 
=?Utf-8?B?UGF1bFc=?=
Guest
Posts: n/a
 
      21st Nov 2007
Off the top of my head, something like this?

sub create_totals()
dim i,n,x as integer

i = 2

do until sheets("Sheet1").cells(i,1) = ""

n = 2
x = 1

do until sheets("Sheet2").cells(n,2) = ""
if sheets("Sheet2").cells(n,2) = Sheets("Sheet1").cells(i,1)
then x = n
n = n + 1
n = n + 1

if x = 1 then x = n
sheets("sheet2").cells(x,2) = sheets("Sheet1").cells(i,1)
sheets("Sheet2").cells(x,3) = sheets("Sheet2").cells(x,3) +
sheets("Sheet1").cells(i,2)

i = i + 1

loop

end sub

That will look down column A of "Sheet1" and add all the names to column B
of "Sheet2" and in column C of "Sheet2" add in whatever is in column B of
"Sheet1" so

Job1 100
Job2 50
Job1 60
Job3 15
Job2 70

will end up as

Job1 160
Job2 120
Job3 15

"Freddy" wrote:

> Yeah I mean something that is automated.
>
> I am trying to build a template that will be sent out to various people all
> year round for population.
>
> The macro buttons are to speed things up for them as they seem incapable of
> doing anything themselves.
>
> "PaulW" wrote:
>
> > Make sure the columns have headers and create a Pivot Table? Or do you mean
> > something else?
> >
> > "Freddy" wrote:
> >
> > > I have a table of columns, some titles, others costs.
> > >
> > > Think I may need to email the files to someone to better demonstrate it.
> > >
> > > Is it possible to create a macro button that will create an additional sheet
> > > that summarises all the headings in column 1 and sums their respective costs
> > >
> > > Then another button on the new sheet that will export the data into a
> > > template in their correct columns.
> > >
> > > I would greatly appreciate anyone's help
> > >
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create an export file using user generated title and export data t efandango Microsoft Access VBA Modules 6 5th Oct 2008 02:50 PM
Print/Export Inbox Summary Wes Microsoft Outlook Discussion 0 28th Feb 2008 05:04 PM
GPO summary - Export and Import =?Utf-8?B?V2F5bmUgR29yZQ==?= Microsoft Windows 2000 Group Policy 0 16th Nov 2005 09:56 AM
How do I export a Word document summary information? =?Utf-8?B?YmJyaWVsbA==?= Microsoft Word Document Management 1 17th May 2005 05:12 PM
Userform then export to summary to spreadsheet w. ability to edit =?Utf-8?B?QWRhbQ==?= Microsoft Excel Programming 1 2nd Mar 2005 10:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:29 PM.