Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to build macro to do calculations by grouping column A by name

Within this worksheet, I have 4 columns

Company Name #logs Boardmember
ABC Luis 1 yes
ABC Anne 1 yes
ABC Mary 9 yes
XYZ John 1 yes
XYZ Grace 4 no
XYZ Ben 8 yes
345 Erin 2 no
345 Kate 0 no
345 Greg 0 no

What I want to solve for is-
Board member Usage (#boardmembers with logs per company1/
#boardmembers per company)
Non Board member usage (#nonboardmembers with logs1 per company/
#boardmembers per company)

For example,
Usage
---------
Team ABC usage = 33%
Team XYZ usage = 66%
Team 345 usage = 100%

Is there a way to do this in a macro? My main problem is finding a way
calculate by company name. Any help would be great
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default How to build macro to do calculations by grouping column A by name

Hi,

Your pseudo formula is

nonboardmembers with logs1 per company/boardmembers per company

so for ABC

ABC Luis 1 yes
ABC Anne 1 yes
ABC Mary 9 yes


3 board members with 1 greater than 1 so your answer of 33% seems to agree
with your pseudo formula

However, Group XYZ

XYZ John 1 yes
XYZ Grace 4 no
XYZ Ben 8 yes


evaluates as 1/2= 50% according to your pseudo code.

or if you mean NON board members
1/1=100%

I can't get 66% out of this

please clarify

Mike



"J.J." wrote:

Within this worksheet, I have 4 columns

Company Name #logs Boardmember
ABC Luis 1 yes
ABC Anne 1 yes
ABC Mary 9 yes
XYZ John 1 yes
XYZ Grace 4 no
XYZ Ben 8 yes
345 Erin 2 no
345 Kate 0 no
345 Greg 0 no

What I want to solve for is-
Board member Usage (#boardmembers with logs per company1/
#boardmembers per company)
Non Board member usage (#nonboardmembers with logs1 per company/
#boardmembers per company)

For example,
Usage
---------
Team ABC usage = 33%
Team XYZ usage = 66%
Team 345 usage = 100%

Is there a way to do this in a macro? My main problem is finding a way
calculate by company name. Any help would be great

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to build macro to do calculations by grouping column A byname

Hi Mike, thanks for the reply!

Please let me fix that as it was a mistake.

boardmember usage
------------
Team ABC boardmember usage = 33% (1/3) ;
Team XYZ boardmember usage = 50% (1/2);
Team 345 boardmember usage = undefined (0/0)

Team ABC non boardmember usage = undefined (0/0) ;
Team XYZ non boardmember usage = 100% (1/1);
Team 345 non boardmember usage = 100% (1/1)

I hope this makes sense and that I didn't make another mistake on
this. Please let me know if there is anything else that I need to
explain. Thanks!



On Feb 17, 3:41*pm, Mike H wrote:
Hi,

Your pseudo formula is

nonboardmembers with logs1 per company/boardmembers per company

so for ABC

* ABC * * * * * * *Luis * * * 1 * * * *yes
* ABC * * * * * * *Anne * * *1 * * * yes
* ABC * * * * * * *Mary * * *9 * * * yes


3 board members with 1 greater than 1 so your answer of 33% seems to agree
with your pseudo formula

However, Group XYZ

* XYZ * * * * * * * John * * *1 * * * *yes
* XYZ * * * * * * * Grace * *4 * * * *no
* XYZ * * * * * * * Ben * * * 8 * * * *yes


evaluates as 1/2= 50% according to your pseudo code.

or if you mean NON board members
1/1=100%

I can't get 66% out of this

please clarify

Mike

"J.J." wrote:
Within this worksheet, I have 4 columns


Company * * *Name * *#logs *Boardmember
* ABC * * * * * * *Luis * * * 1 * * * *yes
* ABC * * * * * * *Anne * * *1 * * * yes
* ABC * * * * * * *Mary * * *9 * * * yes
* XYZ * * * * * * * John * * *1 * * * *yes
* XYZ * * * * * * * Grace * *4 * * * *no
* XYZ * * * * * * * Ben * * * 8 * * * *yes
* 345 * * * * * * * *Erin * * *2 * * * *no
* 345 * * * * * * * *Kate * * 0 * * * *no
* 345 * * * * * * * *Greg * * 0 * * * *no


What I want to solve for is-
Board member Usage (#boardmembers with logs per company1/
#boardmembers per company)
Non Board member usage (#nonboardmembers with logs1 per company/
#boardmembers per company)


For example,
Usage
---------
Team ABC usage = 33%
Team XYZ usage = 66%
Team 345 usage = 100%


Is there a way to do this in a macro? My main problem is finding a way
calculate by company name. Any help would be great


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
Grouping and percentage calculations randlesc Excel Worksheet Functions 2 March 29th 10 10:05 PM
Pivot Tables, Grouping, and Calculations Mike Excel Discussion (Misc queries) 1 February 9th 09 03:49 AM
Running Calculations to build chart cs_in_va New Users to Excel 2 May 21st 08 12:46 PM
Can you build a dialog box to fill a column Don Kline[_3_] Excel Programming 0 April 7th 05 07:40 PM
How to build build a macro that automatically imports PedroPeso Excel Programming 1 December 26th 03 08:14 PM


All times are GMT +1. The time now is 10:31 PM.

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"