Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Limited value based on percentage of total

I have 5 #s. each represents a percentage of the total. how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.

18 0.005552647
228 0.069816829
760 0.232627383
1,177 0.360402951
1,083 0.331600189

3,266

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Limited value based on percentage of total

Wizard475 wrote:
I have 5 #s. each represents a percentage of the total. how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.

18 0.005552647
228 0.069816829
760 0.232627383
1,177 0.360402951
1,083 0.331600189

3,266


With your numbers in A1:A5, sorted descending

B1=IF(A1SUM($A$1:$A$5)*0.3,INT(SUM($A$1:$A$5)*0.3 ),A1)
B2=IF((A2+SUM($A$1:A1)-SUM($B$1:B1))SUM($A$1:$A$5)*0.3,INT(SUM($A$1:$A$5 )*0.3),(A2+SUM($A$1:A1)-SUM($B$1:B1)))

Fill B2 down to B5

If that's not the result you desire, then more information is needed.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Limited value based on percentage of total

thanks for the response. what if i am unable to sort the values?

"Glenn" wrote:

Wizard475 wrote:
I have 5 #s. each represents a percentage of the total. how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.

18 0.005552647
228 0.069816829
760 0.232627383
1,177 0.360402951
1,083 0.331600189

3,266


With your numbers in A1:A5, sorted descending

B1=IF(A1SUM($A$1:$A$5)*0.3,INT(SUM($A$1:$A$5)*0.3 ),A1)
B2=IF((A2+SUM($A$1:A1)-SUM($B$1:B1))SUM($A$1:$A$5)*0.3,INT(SUM($A$1:$A$5 )*0.3),(A2+SUM($A$1:A1)-SUM($B$1:B1)))

Fill B2 down to B5

If that's not the result you desire, then more information is needed.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Limited value based on percentage of total

On Jun 27, 1:13*pm, Wizard475
wrote:
I have 5 #s. *each represents a percentage of the total. *how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.

18 * * *0.005552647
228 * * 0.069816829
760 * * 0.232627383
1,177 * 0.360402951
1,083 * 0.331600189

3,266 *


If the first column of figures is in A2:A6 and the total is in A8, but
the following in B2 (or any parallel column, changing the references
to column B) and copy down, making sure that B1 is blank or text:

=MIN(30%*$A$8,
SUMPRODUCT((ROW(A2)=ROW($A$2:$A$6))
*LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A
$1)))
-SUM($B$1:B1))

That sums the largest N numbers, where is N is the relative row number
in column B; subtracts the sum of the previous N-1 derived values; and
limits the result to 30% of the total.

Note: An alternative expression of the SUMPRODUCT is:

SUMPRODUCT(--(ROW(A2)=ROW($A$2:$A$6)),
LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A$1)))

I remember some discussion of the relative merits; but I don't
remember what they are. In this circumstance, both forms seem to
work.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Limited value based on percentage of total

PS...

On Jun 27, 4:02 pm, I wrote:
*LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A$1))


Sorry about the typos and text alignment in the previous posting. I
hope it is clear.

I just wanted to add.... Since ROW($A$1) always returns 1, you might
wonder: why not simply write 1 instead of ROW($A$1)?

The answer is: it is intended to show the derivation of that factor.
If the table were in A17:A21, you would write ROW($A$16) -- or simply
16, if perfer.


On Jun 27, 4:02*pm, joeu2004 wrote:
On Jun 27, 1:13*pm, Wizard475
wrote:

I have 5 #s. *each represents a percentage of the total. *how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.


18 * * *0.005552647
228 * * 0.069816829
760 * * 0.232627383
1,177 * 0.360402951
1,083 * 0.331600189


3,266 *


If the first column of figures is in A2:A6 and the total is in A8, but
the following in B2 (or any parallel column, changing the references
to column B) and copy down, making sure that B1 is blank or text:

=MIN(30%*$A$8,
* * * * *SUMPRODUCT((ROW(A2)=ROW($A$2:$A$6))
* * * * * * * * * * * * * * * * *LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A
$1)))
* * * * *-SUM($B$1:B1))

That sums the largest N numbers, where is N is the relative row number
in column B; subtracts the sum of the previous N-1 derived values; and
limits the result to 30% of the total.

Note: *An alternative expression of the SUMPRODUCT is:

SUMPRODUCT(--(ROW(A2)=ROW($A$2:$A$6)),
* * * * * * * * * * * * LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A$1)))

I remember some discussion of the relative merits; but I don't
remember what they are. *In this circumstance, both forms seem to
work.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Limited value based on percentage of total

Errata....

Although I believe the following suggestions meets your requirements
as stated, I suspect it does not truly meet your needs. Note that the
results in B2:B6 are not in the same order as the original data. That
is, B2 does not correspond to the figure in A2 -- ergo, it does not
correspond to any descriptive text in a column parallel to A2:A6 (e.g.
category names). If you do indeed need the results to be in the same
order, I don't know if my formula is a good place to start, or if
there is a better approach altogether. Sorry, but I don't have any
more time to think about it.


On Jun 27, 4:02*pm, joeu2004 wrote:
On Jun 27, 1:13*pm, Wizard475
wrote:

I have 5 #s. *each represents a percentage of the total. *how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.


18 * * *0.005552647
228 * * 0.069816829
760 * * 0.232627383
1,177 * 0.360402951
1,083 * 0.331600189


3,266 *


If the first column of figures is in A2:A6 and the total is in A8, but
the following in B2 (or any parallel column, changing the references
to column B) and copy down, making sure that B1 is blank or text:

=MIN(30%*$A$8,
* * * * *SUMPRODUCT((ROW(A2)=ROW($A$2:$A$6))
* * * * * * * * * * * * * * * * *LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A
$1)))
* * * * *-SUM($B$1:B1))

That sums the largest N numbers, where is N is the relative row number
in column B; subtracts the sum of the previous N-1 derived values; and
limits the result to 30% of the total.

Note: *An alternative expression of the SUMPRODUCT is:

SUMPRODUCT(--(ROW(A2)=ROW($A$2:$A$6)),
* * * * * * * * * * * * LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A$1)))

I remember some discussion of the relative merits; but I don't
remember what they are. *In this circumstance, both forms seem to
work.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Limited value based on percentage of total

thanks for the help, i will give it a test.

"joeu2004" wrote:

Errata....

Although I believe the following suggestions meets your requirements
as stated, I suspect it does not truly meet your needs. Note that the
results in B2:B6 are not in the same order as the original data. That
is, B2 does not correspond to the figure in A2 -- ergo, it does not
correspond to any descriptive text in a column parallel to A2:A6 (e.g.
category names). If you do indeed need the results to be in the same
order, I don't know if my formula is a good place to start, or if
there is a better approach altogether. Sorry, but I don't have any
more time to think about it.


On Jun 27, 4:02 pm, joeu2004 wrote:
On Jun 27, 1:13 pm, Wizard475
wrote:

I have 5 #s. each represents a percentage of the total. how can i limit a
number's percentage @ 30% and have what is left move to the remaining
numbers, all the while no one number can be greatter than 30% of the total.


18 0.005552647
228 0.069816829
760 0.232627383
1,177 0.360402951
1,083 0.331600189


3,266


If the first column of figures is in A2:A6 and the total is in A8, but
the following in B2 (or any parallel column, changing the references
to column B) and copy down, making sure that B1 is blank or text:

=MIN(30%*$A$8,
SUMPRODUCT((ROW(A2)=ROW($A$2:$A$6))
*LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A
$1)))
-SUM($B$1:B1))

That sums the largest N numbers, where is N is the relative row number
in column B; subtracts the sum of the previous N-1 derived values; and
limits the result to 30% of the total.

Note: An alternative expression of the SUMPRODUCT is:

SUMPRODUCT(--(ROW(A2)=ROW($A$2:$A$6)),
LARGE($A$2:$A$6,ROW($A$2:$A$6)-ROW($A$1)))

I remember some discussion of the relative merits; but I don't
remember what they are. In this circumstance, both forms seem to
work.



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
add column for percentage o total derwood[_2_] Excel Discussion (Misc queries) 1 December 27th 07 04:53 PM
Percentage total may not exceed 100 The Fool on the Hill Excel Discussion (Misc queries) 5 September 6th 07 03:26 PM
Total Revenue Percentage Willing to learn Excel Discussion (Misc queries) 5 July 19th 07 08:32 PM
Percentage Discount Total mdj101 Excel Discussion (Misc queries) 1 May 18th 06 04:33 PM
a number as a percentage out of a total solskinn Excel Worksheet Functions 3 December 8th 04 06:23 PM


All times are GMT +1. The time now is 12:42 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"