+ Reply to Thread
Results 1 to 10 of 10

Find Identical 4 numbers Straight Or Permuted In a Range

  1. #1
    Registered User
    Join Date
    09-11-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    11

    Find Identical 4 numbers Straight Or Permuted In a Range

    Hi,

    Just to ask anyone down here could help with VB to create a VB so that i could put a list in column A and compare it with column C and i get result in column D if the numbers in column A and column C match in either straight or permuted way.

    Thank you.Attached a sample of what i need.

    Thank A Lot
    Attached Files Attached Files
    Last edited by vanaj; 11-27-2011 at 12:41 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    Hi vanaj

    Could you use a User Defined Function

    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    vanaj,


    Detach/open workbook Find4 arrays a c d InStr - vanaj - EF803173 - SDG16.xls and run macro Find4.



    If you want to run the macro on another workbook:


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


    Please Login or Register  to view this content.

    Then run the Find4 macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    Hi stanleydgromjr
    if column 5 Trying to work out why its a match
    2587 7984 =7984 is contained in: 7894
    was vanaj intial data incorrect?

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    pike,

    It would appear that his original result in cell D4 was not correct (not aligned):
    4578 is contained in: 7894 (4578 is NOT contained in 7894)

  6. #6
    Registered User
    Join Date
    09-11-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    Thank you very much Stan.

    Pike i got it solved,just that i have to fill up the column to get proper results.

    Thank you Pike

    Stan Thank you again.

  7. #7
    Registered User
    Join Date
    09-11-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    11

    Smile Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    @stanleydgromjr

    ;-)Thank you very much.
    Last edited by shg; 11-27-2011 at 01:51 PM. Reason: deleted spurious quote

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    hi vanaj

    if you would like a sub then
    Please Login or Register  to view this content.
    and please dont use the quotes to reply

    Don't quote whole posts -- it's just clutter.

    If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

  9. #9
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    vanaj,

    You are very welcome.

    Glad I could help.

    Thanks for the feedback.

    Come back anytime.

  10. #10
    Registered User
    Join Date
    09-11-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Find Identical 4 numbers Straight Or Permuted In a Data Range( Part 2

    Thank you very much

+ 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