+ Reply to Thread
Results 1 to 4 of 4

Sort Based on Criteria

  1. #1
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Sort Based on Criteria

    Hi all

    Some help on this one would be really appreciated. I've attached a sample spreadsheet. I was wondering if there was a possible VBA or Macro code, which code help me. I thought about using a normal formula but couldn't get it to work.

    I basically want to randomly sort the names and assign different days to them. You'll see on the attachment, I have a list of names against days and want to assign days to different names. However, I want to be re-sort column B (tried RAND but it wasn't the perfect solution) against days. However, I don't want any names to appear more than twice in a row and I want the ability to stop certain names landing on certain days. So for example, I would like 'Kate Winslet' not to appear on Mondays or Thursdays.

    I hope this makes sense.

    Thanks in advance, for the help.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Sort Based on Criteria

    This should do it ...

    I created a control sheet called Control and called your sheet1 Data.

    The control sheet has names in col A and then Mon-Sun in cols B through H. This is used to add/change the names and to specify which day/s they cannot be assigned.

    Having issues attaching files so I can't attach the working file ... sorry.

    Please Login or Register  to view this content.
    Last edited by MatrixMan; 02-27-2017 at 02:27 PM.
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  3. #3
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Re: Sort Based on Criteria

    Thanks for your help with this. I've managed to find a work around, but I might use your code, as it may make things easier.

  4. #4
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Sort Based on Criteria

    File issue resolved - see attached working copy.

+ 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] VBA to sort Table based on Dept criteria
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2016, 11:44 PM
  2. [SOLVED] Sort based on different criteria
    By Hamsan in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-25-2014, 12:03 PM
  3. VBA to sort and filter based on criteria or threshold
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2014, 03:53 PM
  4. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  5. RANDOM Sort based on criteria
    By Technot in forum Access Programming / VBA / Macros
    Replies: 24
    Last Post: 07-02-2011, 06:42 PM
  6. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 AM
  7. Sort based on criteria
    By mesh55 in forum Excel General
    Replies: 3
    Last Post: 05-07-2009, 01:39 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