LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Programmatically create totals and names??

Hi,

This may be a bit lengthy for this group so if I get no replies I will
understand; however, I like to be thorough.

Intro
===
We are working on a complex process to extract data from our time and
billing system to generate commission statements for salespeople. This
process is quite far along and we have gotten to the point where we
have been able to automatically create a spreadsheet that has
individually named sheets for each salesperson that contains basically
the following data:

Full/ | Part/
Consultant | Part | Term | Margin | Commission
Num1 F A 15 200
Num2 F T 15 300
Num3 P A 20 100
Num4 P T 30 150
Num5 F A 25 300

Consultant: Name of the consultant working.

Full/Part: Full or part-time employee. F=1 headcount and P = .5
headcount

Active/Term: A = active and should be counted in headcount and margin
calcs.
T = terminated and is not to be counted in headcount or margin calcs.

Margin: the gross profit margin for this consultant

Commission: the commission to be paid.

Problem
======
We do not know VBA, hardly at all. What we now need to do for multiple
sheets is to:
1) Programmatically create some totals and insert them at the bottom of
each sheet
2) Programmatically create some named ranges for these totals. They
will be linked from another sheet

Totals to be created
==============

Headcount: headcount is the total headcount for all ACTIVE consultants.
In the above table the headcount is equal to 1 + .5 + 1 ( 2.5)

Total Commission: the total commission is the sum of all the numbers in
the Commission column regardless of whether the person is Active or
Terminated.

Average Margin: the average margin is the average of the margins for
all of the ACTIVE consultants, whether part-time or fulltime. In the
above table the Average Margin is equal to (10 + 20 +25)/3 = 20

So, after the macro/VBA runs the table would look like this:

Full/ | Part/
Consultant | Part | Term | Margin | Commission
Num1 F A 15 200
Num2 F T 15 300
Num3 P A 20 100
Num4 P T 30 150
Num5 F A 25 300
======= ========
Headcount= 2.5 20 1,050


And there would be 3 Names created:
Sheet1!headcount
Sheet2!Average-Margin
Sheet3!Total-Commission

Is anyone willing to point me in the right direction...we could
probably figure it out if someone would give us an approach to use.

Thanks in advance,
Jack

 
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
Create totals for close-matching names? t_perkins Excel Worksheet Functions 7 May 6th 08 10:39 PM
programmatically create a macro Jim Warren Excel Programming 2 March 16th 05 10:57 PM
How to refer to programmatically Dynamice Range names Mike Metal Excel Programming 1 February 14th 05 09:31 AM
Defining Names Programmatically Dave Yutzler Excel Programming 2 January 31st 04 04:18 PM
How to create picklists programmatically Harald Staff[_4_] Excel Programming 0 July 16th 03 09:59 AM


All times are GMT +1. The time now is 12:01 AM.

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

About Us

"It's about Microsoft Excel"