Thread: Excel question
View Single Post
  #5  
Old 09-21-2018, 04:40 PM
mathmajor's Avatar
mathmajor mathmajor is offline
Member
SOA AAA
 
Join Date: Dec 2010
Location: Nowhere in particular
Studying for Japanese
College: B.S. Applied Math
Favorite beer: La Croix Grapefruit
Posts: 9,670
Default

Cell B2 and below:
=IF(A2="Total",SUM($B1:B$2)-2*SUMIF($A1:A$2,"Total",$B1:B$2),RANDBETWEEN(1,100 ))

(added randbetween to simulate values)

Cell C2 and below:
=IF(A2="Total","",B2/OFFSET(C2,MATCH("Total",A3:$A$250,0),-1))

Product Count Percent
x1 96 35.6%
x2 97 35.9%
x3 69 25.6%
x4 8 3.0%
Total 270
y1 18 11.4%
y2 88 55.7%
y3 52 32.9%
Total 158
z1 53 17.7%
z2 81 27.0%
z3 96 32.0%
z4 54 18.0%
z5 16 5.3%
Total 300

your welcome
__________________
FSA
Opinions are provided for entertainment purposes only and are no substitute for professional guidance.
Reply With Quote
 
Page generated in 0.18251 seconds with 9 queries