+ Reply to Thread
Results 1 to 8 of 8

Multiple cells, one of two values, no repetition

  1. #1
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Multiple cells, one of two values, no repetition

    Hi.
    I'm having trouble figuring the formula for this one:

    - column of 5 cells
    - Data validation: list (Accepted/Rejected)

    Multiple cells, one of two values, no repetition.jpg

    There can only be one "Accepted" Cell - when the "Accepted" value is defined for a cell, all others have to change back to "Rejected"

    Any help is appreciated.
    Thank you.

    PR
    Last edited by JBeaucaire; 10-10-2016 at 08:10 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple cells, one of two values, no repetition

    That's not a function, that would require VBA to CHANGE the current value in other cells.

    However, you could get this without VBA as long as your willing to force people to set the previous ACCEPT back to REJECTED before than make a new ACCEPT choice.

    You could simply use CONDITIONAL FORMATTING on all those cells to turn the RED if they say ACCEPT in more than one cell. Assuming those cells are B2:B6, a CF rule would look like this:

    =AND(COUNTIF($B2:$B6, "Accepted")>1, $B2="Accepted")

    That would cause just multiple ACCEPTED cells to light up as a warning...
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Re: Multiple cells, one of two values, no repetition

    Hmm... is the VBA alternative complex to implement?
    (I'm not a code savvy)
    Thank you.

    PR

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple cells, one of two values, no repetition

    Not at all, but unless you're using VBA already, this would require you to change your workbook to a .xlsm filetype. Not everyone likes/approves of VBA running in the background all the time. Tradeoffs.


    The code itself is actually pretty simple. Again, assuming the range to watch is B2:B6, this macro would go into the sheet module:

    1) right-click the sheet tab and select VIEW CODE
    2) Paste in this code to the module that appears:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Re: Multiple cells, one of two values, no repetition

    Works like a charm!
    Just one more thing - I do happen to have multiple tables (ranges) - how would the code look like then? I'm almost sure it's not a simple copy and paste...
    Thanx again.

    PR

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple cells, one of two values, no repetition

    Actually I built that with this issue in mind, just have each each "group separately" by editing the With..... range at the top of each section.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Re: Multiple cells, one of two values, no repetition

    Perfect!
    Most grateful. :D
    Thank you.

    PR

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Multiple cells, one of two values, no repetition [Solved]

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 2
    Last Post: 05-26-2015, 07:29 PM
  2. Sum values from multiple cells - multiple lookup values in single cell
    By taxdept in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 04:12 PM
  3. merging of multiple sheet, with forced repetition
    By maheshwow in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-18-2012, 10:41 AM
  4. Finding frequency and repetition of values in cells in a row
    By Adam14 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-25-2011, 05:13 PM
  5. Replies: 6
    Last Post: 12-09-2008, 10:24 AM
  6. [SOLVED] How to find repetition of data in cells in a column?
    By Joseph T J in forum Excel General
    Replies: 1
    Last Post: 02-15-2006, 02:15 PM

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