SOS for dividing every row by a rolling 16th row, creating a % composition by group

melodysc

New Member
Joined
Mar 23, 2023
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I am looking for a way to divide groups of 16 annual $ values in a column by a total row that repeats every 16. I created the "Total for Calc" column in a separate column using formula IF(MOD(ROW(),16),"",SUM(OFFSET(J16,,,-16))) in the original spreadsheet. I need to proceed down 16 rows and divide the groups of 16 using the next total row, repeat, repeat, etc.

My goal is to create a % composition for each media within the group of 16 (should total 100%). I have 43,456 rows and multiple years of data to trend, so it's not possible to do manually. If I can get the formula and pattern down, I can modify across the years and columns. Thank you in advance for the help! - Melody

I've listed an example, with manual calculations for year 2020 to demonstrate what I need to accomplish on a larger scale (there are market names in the excluded column).
Media2020 $ (000)Total for Calc% of media expenditure per category by DMA 20202021 $ (000)Total for Calc% of media expenditure per category by DMA 2021
Direct Mail
$587
27%
$666​
= E1/every 16th row in column E (progressively)…to look like the %s in the example to the left
Mobile
$465​
21%​
$572​
= E2/every 16th row in column E (progressively)
TV OTA
$97​
4%​
$105​
PC or Laptop
$213​
10%​
$265​
Directories
$166​
8%​
$178​
OOH
$121​
6%​
$147​
TV Digital
$21​
1%​
$33​
Cable TV
$103​
5%​
$97​
Radio OTA
$107​
5%​
$116​
OTT
$21​
1%​
$28​
News Print
$123​
6%​
$134​
News Digital
$88​
4%​
$102​
Email
$34​
2%​
$41​
Mags Digital
$19​
1%​
$23​
Radio Digital
$17​
1%​
$20​
Mags Print
$14​
$2,195
1%
$14​
$2,542​
Direct Mail
$112​
28%
$127​
Mobile
$96​
24%​
$118​
TV OTA
$27​
7%​
$29​
PC or Laptop
$37​
9%​
$46​
Directories
$32​
8%​
$35​
OOH
$21​
5%​
$25​
TV Digital
$2​
1%​
$4​
Cable TV
$7​
2%​
$7​
Radio OTA
$20​
5%​
$22​
OTT
$4​
1%​
$5​
News Print
$19​
5%​
$21​
News Digital
$13​
3%​
$15​
Email
$6​
2%​
$8​
Mags Digital
$4​
1%​
$5​
Radio Digital
$2​
0%​
$2​
Mags Print
$3​
$404​
1%​
$3​
$470​
Direct Mail
$56​
27%​
$63​
Mobile
$44​
22%​
$54​
TV OTA
$11​
5%​
$13​
PC or Laptop
$20​
10%​
$25​
Directories
$15​
7%​
$16​
OOH
$11​
6%​
$14​
TV Digital
$3​
1%​
$4​
Cable TV
$6​
3%​
$7​
Radio OTA
$10​
5%​
$11​
OTT
$2​
1%​
$3​
News Print
$12​
6%​
$13​
News Digital
$8​
4%​
$10​
Email
$3​
2%​
$4​
Mags Digital
$0​
0%​
$0​
Radio Digital
$2​
1%​
$2​
Mags Print
$0​
$204​
0%​
$0​
$238​
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,
Not sure to understand ...
Do you mean for cell G2 : =E2/OFFSET(E2,16,0)
 
Upvote 0
Hi & welcome to MrExcel.
Another option
Fluff.xlsm
ABCDEFG
1Media2020 $ (000)Total for Calc% of media expenditure per category by DMA 20202021 $ (000)Total for Calc% of media expenditure per category by DMA 2021
2Direct Mail£58727%£66626%
3Mobile£46521%£57223%
4TV OTA£974%£1054%
5PC or Laptop£21310%£26510%
6Directories£1668%£1787%
7OOH£1216%£1476%
8TV Digital£211%£331%
9Cable TV£1035%£974%
10Radio OTA£1075%£1165%
11OTT£211%£281%
12News Print£1236%£1345%
13News Digital£884%£1024%
14Email£342%£412%
15Mags Digital£191%£231%
16Radio Digital£171%£201%
17Mags Print£14£2,1951%£14£2,5421%
18Direct Mail£11228%£12727%
19Mobile£9624%£11825%
20TV OTA£277%£296%
21PC or Laptop£379%£4610%
22Directories£328%£357%
23OOH£215%£255%
24TV Digital£21%£41%
25Cable TV£72%£71%
26Radio OTA£205%£225%
27OTT£41%£51%
28News Print£195%£214%
29News Digital£133%£153%
30Email£62%£82%
31Mags Digital£41%£51%
32Radio Digital£20%£20%
33Mags Print£3£4041%£3£4701%
34Direct Mail£5627%£6326%
35Mobile£4422%£5423%
36TV OTA£115%£135%
37PC or Laptop£2010%£2511%
38Directories£157%£167%
39OOH£116%£146%
40TV Digital£31%£42%
41Cable TV£63%£73%
42Radio OTA£105%£115%
43OTT£21%£31%
44News Print£126%£135%
45News Digital£84%£104%
46Email£32%£42%
47Mags Digital£00%£00%
48Radio Digital£21%£21%
49Mags Print£0£2040%£0£2380%
Main
Cell Formulas
RangeFormula
G2:G49G2=E2/INDEX(F2:F1000,MATCH("Mags print",A2:A1000,0))
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,325
Members
453,032
Latest member
Pauh

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