Percentage equal distribution of products, at a constant number of 1

K0st4din

Well-known Member
Joined
Feb 8, 2012
Messages
501
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hello, everyone,
I've been trying for several days to put together some formula that might work for me, but somehow I can't.
I hope someone can help me with my dilemma.
I will attach an example.
I have a table with many rows and columns, but I will extract a small part for the example.
In the first column I have names. In the first row I have product names (5, 50 or 500 doesn't matter). Under these products, for each name and for certain products, there is a set number of 1 (one name may have 6 - units, and another 3, a third party may have 9 - units - it is different).
What I'm trying to do is see (calculate) according to the 1's how many there are for each name and divide them by 100% to get an average number in % and distribute it to the adjacent columns which are absolute a copy of the first columns with the product names.
I hope I have explained correctly what I am trying to do.
I remain available if you have any questions and thank you for your assistance.
PraskoviDiniqbyklkianalginaspirinsyrcekrushaPraskoviDiniqbyklkianalginaspirinsyrcekrusha%
ivan ivanov11133.3%33.3%33.3%100.0%
petko petkov1111120.0%20.0%20.0%20.0%20.0%100.0%
nikolai nikolov1111120.00%20.00%20.00%20.00%20.00%100.0%
jon jon111111114.28%14.28%14.28%14.28%14.28%14.28%14.28%100.0%
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
In K2 (under "Praskovi"), you should be able to use
Excel Formula:
=IF(B2<>"",B2/SUM(B2:H2),"")
Then fill that down and across to the right.
 
Upvote 0
Solution
Hello,
thank you very much for the quick reply.
:) That's cool, now I just have to figure it out by putting it in the first column, if I drag it down it's fine, but when I go to the 2nd, 3rd columns, I have to put $$ so it doesn't change my range of cells. :)
But it's cool, I'll just have two formulas.
Be alive and well.
Thanks again!
Rich (BB code):
=IF(B2<>"",B2/SUM(B2:H2),"") and 2nd =IF(B2<>"",B2/SUM($B$2:$H$2),"")
 
Upvote 0
You can just use the one with dollar signs in the first cell, too. No need to have different formulas.
 
Upvote 0
You can just use the one with dollar signs in the first cell, too. No need to have different formulas.
Hi, you want to say
VBA Code:
=IF($B2<>"",B2/SUM(B2:H2),"")
 
Upvote 0
No, put this in the first cell, then drag down/across.
Excel Formula:
=IF(B2<>"",B2/SUM($B2:$H2),"")
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top