Closed Thread
Results 1 to 5 of 5

UDF concatenate randomly chosen cells from range

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    2

    Smile UDF concatenate randomly chosen cells from range

    I need help creating a UDF that concatenates x number of randomly chosen cells from range.
    I also do not want any of the cells repeated.

    I have text in cells A1:A10.
    I want to string together 3 randomly chosen cells to B1 with a delimiter.

    I am trying to get something that looks like this in a cell
    = RandConcat (Rng, NumCells, Delimiter)

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: UDF concatenate randomly chosen cells from range

    Hi. Try UDF Below


    Please Login or Register  to view this content.

    =RANDCONCAT(A1:A10,5,"/")
    Last edited by contaminated; 09-16-2010 at 06:10 PM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    09-16-2010
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: UDF concatenate randomly chosen cells from range

    OMG, thanks a ton contaminated. This is exactly what I need. You saved me so much time and effort!!!

  4. #4
    Registered User
    Join Date
    11-06-2013
    Location
    Korea
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: UDF concatenate randomly chosen cells from range

    This is a really great solution but what if the range is A1:C1.
    How can the code be changed to work horizontally instead of vertically?

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: UDF concatenate randomly chosen cells from range

    Welcome to the forum Pls take some minutes to read forum rules because:

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

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