+ Reply to Thread
Results 1 to 14 of 14

Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

  1. #1
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Using Excel 2010 here.

    Hi all, I'm trying to create a spreadsheet to track votes for an online Mafia/Werewolf game. Here's the setup: column A is the voter, column B and C are the two players column A voted for. After all votes are entered, I use a countif function to tally total votes for each player. The two players with the highest votes are removed from game.

    I ran into a problem tallying voters who changed their votes. I only want to count their final vote and disregard all their previous entries. I'm thinking of creating a helper column and use index+match function to track their previous votes, but there may be lots of duplicate values for a voter during to multiple vote changes. How do I solve this issue?

    Secondly, I'm trying to create a result page that shows the names of all voters who voted for a particular person separated by comma and sorted from earliest to latest. Is there a way to concatenate them into one cell?

    For example: Dead Player | 15 votes | Voter 1, Voter 3, Voter 9.... (12 more names)

    Thank you so much and happy holidays!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Hi there... and welcome to the Excel Forum.

    Will you please attach a sample Excel workbook? Please don't attach a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Thanks Glenn, I've attached the spreadsheet for your review.

    Column C is the post number in the vote thread, 1 being the earliest post

    Column D is the muted player whose votes are not counted in the final tally.

    Column E represents each vote.

    Column F is placeholder, I thought about =concatenate(e3," (", f3, ")") to combine voter and post number in one.

    Column G and H are the two people on each vote

    I think I solved the first problem, please refer to Column M. I used lookup function =IFERROR(LOOKUP(2,1/($E$3:$E3=$E4),G$3:G3),""), which returns the last duplicate value.

    Column S tracks the final vote for each player.

    Now here's the part I couldn't figure out. I want to show who voted for each player (Column TUV etc.), displayed horizontally in chronological order, in multiple cells or in one cell separated by commas. Also I'd like to find a way to reflect the vote changes by each player, for example the changes are struck out. If this is too complex, then I would like to show their final votes only.

    Thanks again!
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Why are 16 & 25 banned? they only have one valid (ie still countable) vote each. In fact Players 3, 5, 7, 19, 20 & 22 each have 2 valid votes each. So who goes???
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Sorry notation was unclear, my bad. Player 8 was banned and vote 13 discarded, so Player 16 and Player 25 now each receive one less vote.

  6. #6
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Updated columns Y to AH. This is similar to what I want, but AC:AH are not sorted chronologically.
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Try this in AC3 copied across and down:

    =IFERROR(INDEX($R$3:$R$100, SMALL(IF($Y3=$S$3:$T$100, ROW($S$3:$T$100)-MIN(ROW($S$3:$T$100))+1, ""), COLUMN(A1))),"")

    entered as an array formula.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Hi AliGW, that's exactly what I did in the file uploaded above your post. Only problem is their order is not arranged chronologically and changes every time I sort the player list.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    No, it isn't. This is what you used:

    =IFERROR(INDEX($Y$3:$Y$100, SMALL(IF($Y3=$Z$3:$AA$100, ROW($Z$3:$AA$100)-MIN(ROW($Z$3:$AA$100))+1, ""), COLUMN(A1))),"")

    and this is what I have used on your sheet which returns the data in chronological order:

    =IFERROR(INDEX($R$3:$R$100, SMALL(IF($Y3=$S$3:$T$100, ROW($S$3:$T$100)-MIN(ROW($S$3:$T$100))+1, ""), COLUMN(A1))),"")

    Try it and see. Look at the change in row 5, for example.

  10. #10
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Fascinating! I see how it's done now and will test further. Thank you so much!

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    You're welcome!

    If that has solved the problem, then please mark the thread as resolved using the thread tools at the top. Thanks!

  12. #12
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    Only one problem remains. Suppose a player votes first but changes vote at the last minute, the returned data will still show the player in the first position, ahead of others who have voted for that person first. Is there a way to track the vote changes in chronological order as well rather than just displaying the final vote? Thanks again.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    That I cannot help you with, sorry, and I suspect it would require some VBA coding.

  14. #14
    Registered User
    Join Date
    12-23-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    8

    Re: Mafia Game Vote Tally - Vote Change Disregard Duplicate Values & Summary Count

    No problem, thanks a lot for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vote sheet
    By Janning197 in forum Excel General
    Replies: 4
    Last Post: 09-05-2016, 03:12 PM
  2. [SOLVED] Calculating Last Vote
    By willhh3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-13-2015, 04:05 PM
  3. Vote - To opt out Voter after voted and duplicate vote count cross dept vote
    By Dahlia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-15-2014, 09:41 PM
  4. VBA REQUEST or VOTE ????
    By downtown1933 in forum The Water Cooler
    Replies: 3
    Last Post: 03-09-2013, 12:45 PM
  5. VBA REQUEST or VOTE ????
    By downtown1933 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2013, 12:33 PM
  6. Vote count formula
    By excellicious in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-05-2008, 06:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1