D'Hondt
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
April 23, 2024, 02:36:12 AM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  About this Site
  Talk Elections Q & A
  How To (Moderator: Virginiá)
  D'Hondt
« previous next »
Pages: [1]
Author Topic: D'Hondt  (Read 1883 times)
You kip if you want to...
change08
Junior Chimp
*****
Posts: 8,940
United Kingdom
Show only this user's posts in this thread
« on: May 04, 2013, 07:29:40 AM »

Anyone know how to model D'Hondt allocation in Excel?
Logged
True Federalist (진정한 연방 주의자)
Ernest
Moderators
Atlas Legend
*****
Posts: 42,156
United States


Show only this user's posts in this thread
« Reply #1 on: May 04, 2013, 01:25:32 PM »

Yes and no.  If you mean doing it so that Excel does all the work then no.  If you mean doing it so that Excel makes it easier, then yes, and my method helps with any quota system

Set up with

Column A = Name
Column B = Votes received
Column C = Number of seats already allocated
Column D = Quota for next seat
Column E = Max of all quotas - quota for this seat.

Columns A & B are filled with the raw data.
Column C you start with all 0's (Since this is D'Hondt.  When using this method to do Congressional apportionment I use 1's.
Column D you calculate.  For D'Hondt the formula for cell D2 would be =B2/(C2+1)
Column E you calculate.  Assuming seven candidates in rows 2 to 8, the formula for E2 would be =MAX(D$2:D$8)-D2 .  The dollar signs mean that when you copy and paste the formula, the max will still be calculated over rows 2 to 8.

One of the values in Column E will be 0, which indicates who gets the next seat.  So simply increase the value of Column C in that row by 1.  Excel will recalculate, and you keep assigning seats until all that are to be are assigned are assigned.

There are some things you can do to make this easier, but this is sufficient.

Also, the above assumes simple closed-list D'Hondt with no thresholds.  If there are thresholds, zero out the votes of parties that don't make the threshold before assigning seats.
Logged
Pages: [1]  
« previous next »
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.021 seconds with 12 queries.