+ Reply to Thread
Results 1 to 4 of 4

Create column of (near) duplicates from column of solitary values

  1. #1
    Registered User
    Join Date
    03-21-2007
    Posts
    5

    Create column of (near) duplicates from column of solitary values

    I have written a test and would like to randomly sort the test questions and answers.

    The questions and answers each have a separate row of a table in MS Word.

    1. I made a column of RAND() dragging down to complete 100 rows.
    2. I copied the values as values to a new column and deleted the original RAND() column
    3. The random values are now in column A. In column B, I entered:

    B1: = A1
    B2: =IF(MOD(ROW(),2)=0,B1,A1)

    4. I dragged this to 200 rows.

    5. This gave me duplicate values of the random numbers like this:

    0.425437397
    0.425437397
    0.917191665
    0.917191665
    0.846796832
    0.846796832

    6. Is there a way to tweak this slightly so the second duplicate in each pair is a hair larger than the first number? For example, 0.00001 larger?

    The reason is when I sort, I want the answer to the question to always sort after the question item itself.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Create column of (near) duplicates from column of solitary values

    Change the formula in B2 to this:

    =IF(MOD(ROW(),2)=0,B1+0.00001,A1)

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-21-2007
    Posts
    5

    Re: Create column of (near) duplicates from column of solitary values

    Thank you for your help. This worked beautifully!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Create column of (near) duplicates from column of solitary values

    Glad to be able to help.

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

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] Removing duplicates from column A while keeping their respective values from column B
    By joel.mugabe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-19-2016, 02:38 AM
  2. Replies: 2
    Last Post: 05-19-2015, 08:50 AM
  3. Merge values from column in one cell, based on duplicates in another column
    By Rawland_Hustle in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-24-2014, 11:04 AM
  4. Delete rows where column A has duplicates based on values in Column B
    By rajakumar.g@tcs.com in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-08-2013, 08:45 AM
  5. [SOLVED] Find duplicates in column A, add values from column B (possibly delete duplicates)
    By luarwhite in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2013, 04:34 PM
  6. [SOLVED] Macro to count unique values in a column, enter it in next column, then delete duplicates
    By pmorisse in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2013, 03:27 PM
  7. Script to check for duplicates in one column then alter adjacent column values
    By SebN in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2010, 12:23 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