+ Reply to Thread
Results 1 to 5 of 5

Vote sheet

  1. #1
    Registered User
    Join Date
    09-05-2015
    Location
    Dallas, TX
    MS-Off Ver
    2013
    Posts
    12

    Vote sheet

    Hi,

    I have an easy one (not for me). I basically want to make a vote sheet, columns Name (optional), For, Against. (columns A,B,C which can have ..oh? say 1000+ rows) Column D will be empty.
    (Frist row, will be header/column names)
    Column E will be one cell E2, total FOR's - counts the total number of "X" in Column B rows ,
    Column F will be one cell F2, total Against's - counts the total number of "X" in Column C rows ,
    and Column G - one row - total votes...is total of E2 + F2
    Columns, E,F, and G are protected (I think I got that part)

    how can I?
    1) Force rows in column B contain "X" or null, (and if the same row has data in column C has an "X", that B row has to be null)
    2) Force rows in column C contain "X" or null, (and if the same row has data in column B has an "X", that C row has to be null)
    3) Cell E2 counts all the "X's" in Column B
    4) Cell F2 counts all the "X's" in Column C
    5) Cell G2 is simply E2+F2 (I have this one working)

    Below is what I've thrown together so far...the 1's should be X's

    http://www.aanning.com/ajissues/VoteSheet/vote1.jpg

    Thanks James
    Attached Images Attached Images

  2. #2
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    281

    Re: Vote sheet

    What you're looking for is called 'dependent validation'.

    Each cell in FOR and AGAINST has a dropdown list to select and 'X' from, however, if an 'X' is already in the opposing column it will not be available to select.

    This is achieved by setting up two validation lists, one list named 'Vote' containing an 'X', and the other list named 'VoteX' containing a blank value.
    The formula in the validation settings is =INDIRECT("Vote"&C2), this creates a link to a one of these named lists by joining the text 'Vote' to the value that is in the opposing cell in that row.
    So, using cell B2 as an example, if no 'X' has been selected in cell C2 then the indirect named list used will just be 'Vote', but if an 'X' has been selected in cell C2 then the indirect named list will be 'VoteX'
    The named list 'Vote' contains and 'X', whereas the named list 'VoteX' contains a blank.
    This way you can never select an 'X' if there is already one in same row in the opposing column.

    Of course, you could just have a single column and have a dropdown list to select either 'FOR' or 'AGAINST'?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-05-2015
    Location
    Dallas, TX
    MS-Off Ver
    2013
    Posts
    12

    Re: Vote sheet

    Yes! this works great!..however, I've changed my criteria a bit. Instead of "X", in for/against....using "Yes" in the B column, and "No" in the Column.
    For the life of me, I can't figure out how to change this ! (embarrassing, as I've been an Oracle developer for 20 yrs)
    Where is the LOV for this?
    I for sure want to keep the cross validation between columns B and C.
    Also, want to hide the validations sheet, only first sheet visible...pretty sure I can do that. (Hide sheet)
    Also, want the only editable Cells to be Name, For and Against (A2 to A-all, B2 to B-all, and C2 to C-all, - A1, B1, and C1 NOT editable, along with all others ie col's E,F,G)

  4. #4
    Registered User
    Join Date
    09-05-2015
    Location
    Dallas, TX
    MS-Off Ver
    2013
    Posts
    12

    Re: Vote sheet

    So, to summarize, what's left I need to do, and am having issue:

    1) to keep it clean, and follow suit with the instructions I've given, I need column B to only be "Yes" or blank, column C "No" or blank.
    I thought I had the cross validation, it works in B2.(try to enter data in B2), If col B has data, no entry in col C for that row. If col C has data,
    no entry in col B for that row.

    see the below shared sheet, feel free to do anything with this sheet, it is a test sheet, I have original saved off.

    https://docs.google.com/spreadsheets...it?usp=sharing

  5. #5
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    281

    Re: Vote sheet

    See attached.

    I have changed the values to Yes or No.

    I have also unlocked the cells in the 3 columns and protected the sheet (no password).

    You can just right-click the validation sheet tab and select Hide - you can also add workbook protection to ensure that it cannot be unhidden.

    * Just note that whilst the validation will prevent a user from selecting Yes and No in the same row, it is still possible for a user to paste those values in and circumvent the validation. As far as I know the only way to prevent this is to resort to using some VBA code, unless there is an option in the later versions of Excel that I don't know about. If this will be a concern either you can a) Add the VBA code (but that will mean you will have to ensure that your user/s have Macros enabled), b) Add an additional formula and/or conditional formatting to indicate if a user has done this, or c) Just have a single column and have the user select either Yes or No (or For or Against).
    Attached Files Attached Files
    Last edited by EchoPassenger; 09-05-2016 at 03:20 PM.

+ 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. [SOLVED] Calculating Last Vote
    By willhh3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-13-2015, 04:05 PM
  2. 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
  3. 'Rate this thread' - What happens to the vote?
    By Ace_XL in forum The Water Cooler
    Replies: 3
    Last Post: 11-26-2013, 04:05 AM
  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

Tags for this Thread

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