+ Reply to Thread
Results 1 to 19 of 19

Permutations without repetitions for 5 items in Excel

  1. #1
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Permutations without repetitions for 5 items in Excel

    Hello all!

    I have a problem to solve.

    I have 5 items: NE, NW, Central, SW and SE.

    How do I list all 5 items without repetition in Excel without manual work? Thank you.

  2. #2
    Forum Contributor
    Join Date
    05-18-2021
    Location
    London, Ontario
    MS-Off Ver
    365
    Posts
    113

    Re: Permutations without repetitions for 5 items in Excel

    Can you explain in more detail? It's not really clear what you're trying to do

  3. #3
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Hello, Sorry I don't know where my previous thread reply went.

    I have 5 items: NW NE CENTRAL SW SE.

    I want to list them in ways without repetition: NW NE CENTRAL SW SE, NW NE CENTRAL SE SW, NW CENTRAL NE SE SW, etc.

    Anyway to list them without manual work in excel? thank you.

  4. #4
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    And what about 9 items (city names) without manual label of hundreds of ways of having 9 cities listed without repetition? Thank you.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    See attached
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Quote Originally Posted by JohnTopley View Post
    See attached
    Hello John!

    Thank you for your reply.

    Can you please explain how you did it? Thank you.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    Input to the calculation is on Sheet1.

    A1 is "C" for Combination, "P" for Permutation

    A2 is number of items in the C/P

    A3 down is list of items to be included

    Click RUN button to trigger macro.

  8. #8
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Quote Originally Posted by JohnTopley View Post
    Input to the calculation is on Sheet1.

    A1 is "C" for Combination, "P" for Permutation

    A2 is number of items in the C/P

    A3 down is list of items to be included

    Click RUN button to trigger macro.
    Hello John,

    Is it possible to have each of 5 items in an cell on its own (instead of having all 5 directions all in one cell)? Thank you.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    in B1

    =TRIM(MID(SUBSTITUTE($A1,",",REPT(" ",LEN($A1))),(COLUMNS($A:A)-1)*LEN($A1)+1,LEN($A1)))

    Copy across to F then down

  10. #10
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Quote Originally Posted by JohnTopley View Post
    in B1

    =TRIM(MID(SUBSTITUTE($A1,",",REPT(" ",LEN($A1))),(COLUMNS($A:A)-1)*LEN($A1)+1,LEN($A1)))

    Copy across to F then down


    Hello John

    It worked!

    What about 9 locations, please see attached doc. Attachment 734430

  11. #11
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Please see the attached document. Thank you.
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    Do you realise that there 362880 permutations?

    Post #7 has instructions on how to use the macro.
    Last edited by JohnTopley; 05-28-2021 at 02:43 AM.

  13. #13
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Hello John,

    yes, I do realize that is the number of permutations with 9 locations without repetitions. Thank you.

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    O.K then .

    Post #7 has instructions on how to use the macro.

  15. #15
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Quote Originally Posted by JohnTopley View Post
    O.K then .
    Hello John,

    When I change the current 5 (NE NW etc) to the new 9 location names, do I have to edit the Macro as well? I did a test and don't think it is working properly. Thank you.

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

    No:

    Just change 5 to 9 in A2 ,add your list of cities in A3 down, then RUN

  17. #17
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Thank you John!

    The number of permutations have effective overwhelmed the Qualtrics drill-down question type. lol Thank you and have a wonderful weekend

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,336

    Re: Permutations without repetitions for 5 items in Excel

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  19. #19
    Registered User
    Join Date
    05-27-2021
    Location
    Canada
    MS-Off Ver
    2017
    Posts
    11

    Re: Permutations without repetitions for 5 items in Excel

    Quote Originally Posted by JohnTopley View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    THANK YOU AGAIN John

+ 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] COMPLETE permutations from permutations
    By Juggler_IN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-30-2020, 11:42 AM
  2. [SOLVED] the macro excel that Finds lotteries Repetitions patterns on past results every 50 drawing
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2017, 09:56 AM
  3. Number of repetitions in a collumn and counting those repetitions
    By ctrc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2017, 11:36 AM
  4. Excel Permutations
    By jimmyrivers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 10:29 AM
  5. excel and permutations
    By achillesjr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2011, 11:51 AM
  6. Excel Permutations!
    By jules85 in forum Excel General
    Replies: 1
    Last Post: 03-08-2008, 12:16 AM
  7. avoid repetitions in excel
    By aosewa@gmail.com in forum Excel General
    Replies: 1
    Last Post: 09-08-2005, 10:05 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

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.09370 seconds
  • Memory Usage 9,363KB
  • Queries Executed 16 (?)
More Information
Template Usage (35):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (6)bbcode_quote
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (19)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (2)postbit_attachment
  • (19)postbit_legacy
  • (19)postbit_onlinestatus
  • (19)postbit_wrapper
  • (4)showthread_bookmarksite
  • (7)showthread_similarthreadbit
  • (1)showthread_similarthreads
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php
  • ./includes/functions_notice.php 

Hooks Called (49):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • postbit_attachment
  • tag_fetchbit_complete
  • showthread_similarthread_query
  • showthread_similarthreadbit
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1