+ Reply to Thread
Results 1 to 7 of 7

Excel Key Combination

  1. #1
    Registered User
    Join Date
    07-05-2007
    Location
    Wiltshire, England
    MS-Off Ver
    Microsoft Office Home and Student 2013
    Posts
    42

    Excel Key Combination

    Hi

    Outside the door of my flat I have a key holder – which has a combination of 4 digits. No-one knows what the combination is, so I’d like to try to find it, clear it and use it.
    I wondered if there was a way to use excel to show all of the possible combinations so I can then tick them off as I try them…?

    The possible numbers are 0-9, but you cant press a button more than once in any given attempt… so… first possible combination would be 0123… not 0001.

    Thanks

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Excel Key Combination

    Hi,

    This code

    Please Login or Register  to view this content.
    found here will do what you want.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Excel Key Combination

    Hi,

    and as an alternative to a macro approach, see attached ....

    - created the first valid number in A2 = 123
    - in A3 put =A1+1
    - in column B put =TEXT(A2,"0000")
    - In columns C, D, E and F put respectively
    Please Login or Register  to view this content.
    - in column G put =COUNTIF(C2:F2,C2)+COUNTIF(C2:F2,D2)+COUNTIF(C2:F2,E2)+COUNTIF(C2:F2,F2)=4
    - copy A to G down to row 9755
    - click in the table and activate Autofilter (Data - Filter - Autofilter)
    - select "TRUE" only in the dropdown filter for Column G
    - hide columns A, C to G

    Try not to kill too many trees printing the list. With unchanged standard settings and A4 paper, this will produce a 100 page printout. But you could try to copy and paste special - Values to create several columns on one single sheet and bring the printout down to 20 pages.

    There are probably more elegant ways to produce the list, but I'm sure there aren't any duplicate digits in the numbers still showing!

    Happy trialling.
    Attached Files Attached Files
    Last edited by teylyn; 12-23-2009 at 05:37 AM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Excel Key Combination

    heres the list 10 pages long
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Excel Key Combination

    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  6. #6
    Registered User
    Join Date
    07-05-2007
    Location
    Wiltshire, England
    MS-Off Ver
    Microsoft Office Home and Student 2013
    Posts
    42

    Re: Excel Key Combination

    thanks v much

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

    Re: Excel Key Combination

    If the lock responds to the last 4 digits pressed (like some electronic door locks), then this can be done by pressing 5043 buttons rather than 4 * 5040 = 20,160 buttons,
    Entia non sunt multiplicanda sine necessitate

+ 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