Log in / create account Article Discussion Edit History Go to the site toolbox

How to determine the winner in a multi-candidate election

From Reporting Cookbook: www.forjournalists.com/cookbook

Say there was just an election for governor and you have county-by-county vote totals for the six Democratic candidates. How do you determine the winner in each of the 120 counties, while also taking into account the possibility there could be ties?

Here's one solution, cadged from some online searches and scraps of old postings on NICAR-L. The formula looks like this:


=IF(COUNTIF(C2:H2,MAX(C2:H2))>1,"Tie",INDEX($C$1:$H$1,1,MATCH(MAX(C2:H2),C2:H2,0)))

The top row of the spreadsheet is arranged this way:

County Precincts Beshear Galbraith Henry Hensley Lunsford Richards Winner

Each subsequent row gives the vote totals for each candidate, in columns C to H. The formula, which you copy down each row in the winner column, looks in that row and if there is more than one largest number, as determined by the MAX() function, writes "Tie." Otherwise it takes the cell with the largest number, then, using a combination of the INDEX() and MATCH() functions, looks for the corresponding header of that column and writes that in the winner column.

Site Toolbox:

Attribution-Noncommercial-Share Alike 3.0 Unported
This page was last modified 02:49, 23 October 2008. - This page has been accessed 744 times. - Disclaimers - About Reporting Cookbook