+ Reply to Thread
Results 1 to 3 of 3

RAND cells but ignore empty cells with data at the top

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    RAND cells but ignore empty cells with data at the top

    I am trying to create a random draw for a golf team event with teams of three, where each team consists of a low - mid - high handicap player. Now I have created the the total number of players under one tab where I sort them into handicap order low to high; then selecting the lowest third I copy and paste them into the low handicap group under tab Random in the sheet below, repeating for the mid and then the high.

    In the Random sheet I have created a macro worksheet where I am trying to do a randomized draw. I have three columns with adjacent RAND columns alongside each. These are columns A - H respectively. There are 23 rows with the heading in row 1. Now after pasting the above entries as above via a button that activates a macro to paste the data into the relevant column.

    Once I have all three columns occupied I then run a macro called RandomDraw which randomizes all three columns. Problem is the data is sorted in all three columns but it sorts the blank cells as well. How can I make ignore the blanks and leave the cells containing data at the top. In this instance I only have 8 names in each column but this could vary.

    The macro that does this is as follows.

    Please Login or Register  to view this content.
    Last edited by muffybean; 10-10-2012 at 03:30 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: RAND cells but ignore empty cells with data at the top

    Please edit your post and replace quote with code in each set of brackets.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: RAND cells but ignore empty cells with data at the top

    Sorry about that but I did not realise this. Hope this OK, I am a relative newbie.
    Last edited by muffybean; 10-10-2012 at 03:54 PM.

+ Reply to 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