+ Reply to Thread
Results 1 to 5 of 5

Extracting different combination to new worksheet

  1. #1
    Registered User
    Join Date
    11-11-2008
    Location
    singapore
    Posts
    11

    Extracting different combination to new worksheet

    Hi all,

    I was wondering if there is any ways which I could do the following action using Excel function or vba

    I have a number (eg. 1234) in a cell say B2 and I would like to check through a column (or table) to see if any combination (eg. 2341, 3421, 4321,1342...etc ) is present and extract it and place it on another worksheet

    Example :
    worksheet 1, Cell B2 is 1234

    Check through a column ( or table ) on worksheet 1 with reference to B2
    Then copy the different combination found on the column (or table) to worksheet 2

    Thus worksheet 2 should have the following
    1234, 2341, 3421, 4321, 1342 on different cells

    Please advice. Thank You
    Last edited by marcmade; 11-08-2016 at 05:43 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extracting different combination to new worksheet

    If you only have 4 characters this may help.

    Please Login or Register  to view this content.

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

    Re: Extracting different combination to new worksheet

    You could use a formula in a convenient column and filter on that:

    A
    B
    C
    1
    Input
    2
    1234
    3
    Number
    Test
    4
    3124
    TRUE
    B4: =SUMPRODUCT(SMALL(--MID(A4, {1,2,3,4}, 1), {1,2,3,4}) * 10^{3,2,1,0}) = $B$2
    5
    3125
    FALSE
    6
    2134
    TRUE
    7
    1233
    FALSE


    The digits of B2 must be in ascending order.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-11-2008
    Location
    singapore
    Posts
    11

    Cool Re: Extracting different combination to new worksheet

    Thanks all for the respond.
    By tweaking slightly... manage to get to code work as I wanted on my file.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extracting different combination to new worksheet

    You're welcome. Glad to help out.

+ 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. Replies: 5
    Last Post: 02-10-2013, 06:54 PM
  2. Replies: 2
    Last Post: 06-26-2012, 11:55 AM
  3. creating new worksheet based on certain value on a worksheet and extracting values
    By deep1blue in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-27-2011, 10:47 AM
  4. How to search for a combination and copy rows over to a new worksheet
    By joemtl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2009, 02:29 PM
  5. Extracting Information from Worksheet
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2008, 10:52 AM
  6. extracting best combination
    By jwesleythomas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-06-2007, 12:49 PM
  7. Extracting value from Combination drop down-edit box
    By Mr.Bob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2005, 11:05 AM
  8. [SOLVED] Extracting worksheet index
    By Ziv in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2005, 05:06 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