thegreatgaru
New Member
- Joined
- Jan 27, 2017
- Messages
- 2
I have a list of ZIP codes a newspaper distributes to and potential markets a company may enter into. To advertise to these markets we must strategically distribute to specific ZIP codes. However, some markets overlap ZIP codes, so if multiple markets were entered into, there wouldn't be a need to buy distribution if the ZIP code is already saturated.
Below is an example table of the data:
[TABLE="width: 374"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: center"]Market A
[/TD]
[TD="align: center"]Market B[/TD]
[TD="align: center"]Market C
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]12345[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]12346[/TD]
[TD="align: center"][/TD]
[TD="align: center"]155[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]12347[/TD]
[TD="align: center"]250[/TD]
[TD="align: center"]250[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]12348[/TD]
[TD="align: center"]110[/TD]
[TD="align: center"][/TD]
[TD="align: center"]110[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]12349[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]500
[/TD]
[/TR]
</tbody>[/TABLE]
I want to have a drop down table where I would be able to select the markets. Based on how I stack them, it would give me the incremental circulation needed to cover that market. Below are 2 examples of ideal output:
[TABLE="width: 208"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD="align: center"]Additional Circulation
[/TD]
[/TR]
[TR]
[TD]Market A[/TD]
[TD="align: center"]460[/TD]
[/TR]
[TR]
[TD]Market B[/TD]
[TD="align: center"]155[/TD]
[/TR]
[TR]
[TD]Market C[/TD]
[TD="align: center"]500
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 208"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD="align: center"]Additional Circulation
[/TD]
[/TR]
[TR]
[TD]Market B[/TD]
[TD="align: center"]405
[/TD]
[/TR]
[TR]
[TD]Market C[/TD]
[TD="align: center"]710[/TD]
[/TR]
[TR]
[TD]Market A[/TD]
[TD="align: center"]0[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for a formula to get the desired output for the tables.
Any help would be great!
Thanks!
Below is an example table of the data:
[TABLE="width: 374"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: center"]Market A
[/TD]
[TD="align: center"]Market B[/TD]
[TD="align: center"]Market C
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]12345[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"][/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]12346[/TD]
[TD="align: center"][/TD]
[TD="align: center"]155[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]12347[/TD]
[TD="align: center"]250[/TD]
[TD="align: center"]250[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]12348[/TD]
[TD="align: center"]110[/TD]
[TD="align: center"][/TD]
[TD="align: center"]110[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]12349[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]500
[/TD]
[/TR]
</tbody>[/TABLE]
I want to have a drop down table where I would be able to select the markets. Based on how I stack them, it would give me the incremental circulation needed to cover that market. Below are 2 examples of ideal output:
[TABLE="width: 208"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD="align: center"]Additional Circulation
[/TD]
[/TR]
[TR]
[TD]Market A[/TD]
[TD="align: center"]460[/TD]
[/TR]
[TR]
[TD]Market B[/TD]
[TD="align: center"]155[/TD]
[/TR]
[TR]
[TD]Market C[/TD]
[TD="align: center"]500
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 208"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Market[/TD]
[TD="align: center"]Additional Circulation
[/TD]
[/TR]
[TR]
[TD]Market B[/TD]
[TD="align: center"]405
[/TD]
[/TR]
[TR]
[TD]Market C[/TD]
[TD="align: center"]710[/TD]
[/TR]
[TR]
[TD]Market A[/TD]
[TD="align: center"]0[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for a formula to get the desired output for the tables.
Any help would be great!
Thanks!