+ Reply to Thread
Results 1 to 8 of 8

How to select random cell value from multiple columns without duplicates

  1. #1
    Registered User
    Join Date
    04-26-2020
    Location
    Japan
    MS-Off Ver
    Office Mac
    Posts
    17

    How to select random cell value from multiple columns without duplicates

    Hello.

    I have 7 columns (groups) of data.

    I'd like to randomly select a cell value from any of the groups several times (say, 5 times) without duplicates.
    The results should be categorised into their respective groups i.e. if cell B8 was the random selection and is from group 1, the result should be displayed in group 1 in another table (see sample file).

    What would the formula look like?

    Thanks for your help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: How to select random cell value from multiple columns without duplicates

    Try this in B14:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-26-2020
    Location
    Japan
    MS-Off Ver
    Office Mac
    Posts
    17

    Re: How to select random cell value from multiple columns without duplicates

    The formula only selects a random cell from one column and not all columns. Also, if the random cell is from, say, cell F3, then the result would need to show in cell F14 only since it is from group 3. All the other cells in row 14 would be blank.

    Hope this makes more sense.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: How to select random cell value from multiple columns without duplicates

    Hi,

    See attached file
    Attached Files Attached Files
    Last edited by Phuocam; 04-26-2020 at 10:29 PM.

  5. #5
    Registered User
    Join Date
    04-26-2020
    Location
    Japan
    MS-Off Ver
    Office Mac
    Posts
    17

    Re: How to select random cell value from multiple columns without duplicates

    Hi and thanks for the swift response.

    This looks splendid! It seem to work for me. If you don't mind, could you explain how you came up with the formula used in A14:A18?

    Thank you again.

  6. #6
    Registered User
    Join Date
    04-26-2020
    Location
    Japan
    MS-Off Ver
    Office Mac
    Posts
    17

    Re: How to select random cell value from multiple columns without duplicates

    I also noticed in the formula you locked $A$13:A13.. which I didn't quite understand..
    For example in cell A14 the formula is:
    =SMALL(IF(COUNTIF($A$13:A13,ROW(INDIRECT("1:"&$M$11)))=0,ROW(INDIRECT("1:"&$M$11)),""),RANDBETWEEN(1,$M$11+1-ROWS($A$13:A13)))

    Why $A$13:A13? This cell points to a header. Please elaborate.

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: How to select random cell value from multiple columns without duplicates

    You can split the formula to see it.

    Or try

    in A14: ="group "&RANDBETWEEN(1,7)

    in B14: =IF($A14=B$13,INDEX(B$2:B$11,MATCH(LARGE(A$2:A$11,COUNTIF($A$14:$A14,$A14)),A$2:A$11,0)),"")
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-26-2020
    Location
    Japan
    MS-Off Ver
    Office Mac
    Posts
    17

    Re: How to select random cell value from multiple columns without duplicates

    Thank you very much for the great feedback.

+ 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. Compare and/or select and delete duplicates between 2 columns?
    By GaryHatesSpam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2020, 10:14 PM
  2. Replies: 1
    Last Post: 06-22-2019, 02:09 PM
  3. Replies: 1
    Last Post: 10-19-2016, 12:22 PM
  4. Random names without duplicates and multiple criteria
    By finch2o in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2016, 11:31 AM
  5. Select a cell at random based on multiple selection criteria across multiple sheets.
    By scottyms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2016, 09:44 AM
  6. Random numbers, no duplicates, across rows and columns
    By Bambamghost in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2016, 02:01 PM
  7. How to Select Cell by Multiple Columns
    By JaedenRuiner in forum Excel General
    Replies: 4
    Last Post: 11-29-2011, 01:10 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