+ Reply to Thread
Results 1 to 6 of 6

Strangeness when randomizing a column of text

  1. #1
    Registered User
    Join Date
    07-18-2016
    Location
    San Diego
    MS-Off Ver
    2007
    Posts
    13

    Strangeness when randomizing a column of text

    I'm working with two columns: Col-A contains the formula "=1000*RAND()", formatted to produce integers from 100 to 999. Col-B contains the names of the components of my mp3 collection, one file per cell and about 350 cells running down Col-B.

    My objective is to easily create randomized playlists, (*.m3u).

    With Excel 2007, I select the two columns A & B and then run through: DATA/SORT & FILTER/SORT AZ: Sort by (Col-A); Sort on (VALUES); Order (SMALLEST to LARGEST). Seems simple enough.

    The results are not what I expected: In Cols A&B are newly-randomized columns, and every time I "DATA/SORT" both Cols-A&B re-randomize in no particular or repeating order. I should be happy because I have an easily created playlist, but I expected B to be unchanged until I sort them again together using the newly random-numbered Col-A as the ordering column on the alphabetized (or not) Col-B.

    Can someone tell me what's happening? Why do both columns re-randomize with every successive "DATA/SORT"?

  2. #2
    Forum Contributor
    Join Date
    11-21-2015
    Location
    Philippines
    MS-Off Ver
    Microsoft Office 2016
    Posts
    146

    Re: Strangeness when randomizing a column of text

    If you don't want B to be unchanged, you should be "sort & filter" only column A!

  3. #3
    Registered User
    Join Date
    07-18-2016
    Location
    San Diego
    MS-Off Ver
    2007
    Posts
    13

    Re: Strangeness when randomizing a column of text

    Thanks for your answer. Your double negative threw me until I realized you likely meant "If I don't want B to be CHANGED..." But my question states that I WANT B to be changed, randomizing my list. And in fact, it DOES change - as desired - but why?

    Although Cols A & B are selected, I'm sorting (Col-A), on (VALUES), (SMALLEST to LARGEST). Recall Col-A contains "=1000*RAND()" and Col-B is an alphabetical list. With this setup, I wouldn't expect Col-B to change until a second SORT.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Strangeness when randomizing a column of text

    Column A recalculates after the sort. If you don't want that to happen, you'd need to copy and paste as values.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    07-18-2016
    Location
    San Diego
    MS-Off Ver
    2007
    Posts
    13

    Re: Strangeness when randomizing a column of text

    YES! That was it. I figured it out just before I read your post. After a random recalc, Col-A of the last row was empty. So I just put a "1" in. After the next recalc, that line appeared at the top in row 1. Conundrum solved and rep added. Thanks for your time and energy.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Strangeness when randomizing a column of text

    You're welcome.

+ 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. Randomizing text in cell
    By d3d3hello in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2016, 12:36 PM
  2. Can't undo paste and other strangeness
    By zerozero in forum Excel General
    Replies: 8
    Last Post: 05-26-2011, 05:49 AM
  3. Help With Randomizing
    By steve_ojapan in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-31-2008, 11:29 PM
  4. Insert Row Formula Strangeness
    By Cavar in forum Excel General
    Replies: 9
    Last Post: 10-28-2006, 10:11 PM
  5. Conditional formatting strangeness
    By duncan79 in forum Excel General
    Replies: 5
    Last Post: 05-18-2006, 12:10 AM
  6. Conditional formatting strangeness
    By christopherp in forum Excel General
    Replies: 13
    Last Post: 03-06-2006, 08:55 AM
  7. Strangeness with times
    By ANDREW45 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2005, 09:41 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