Results 1 to 6 of 6

Find all possible combinations of letters

Threaded View

  1. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Find all possible combinations of letters

    Where do you want the output? I now used range A1:A
    Sub AllOptions()
    Dim character As Integer 'Asc("a")=97, Asc("h")=104
    Dim i, j, k As Long
    Dim RowCounter
      RowCounter = 1
      For i = Asc("a") To Asc("h")
        For j = Asc("a") To Asc("h")
          For k = Asc("a") To Asc("h")
            If Abs(i - j) > 1 Or Abs(j - k) > 1 Then
              If i <> j And j <> k And i <> k Then
                Cells(RowCounter, 1) = Chr(i) & Chr(j) & Chr(k)
                RowCounter = RowCounter + 1
              End If
            End If
          Next k
        Next j
    Next i
    End Sub
    Last edited by rwgrietveld; 09-25-2008 at 03:59 AM.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. find a fixed total using combinations of smaller figures?
    By kev.b.123 in forum Excel General
    Replies: 8
    Last Post: 12-29-2009, 01:05 AM
  2. [SOLVED] match 3 hold digits
    By stewart08 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-13-2008, 03:30 PM
  3. Find all possible numerical combinations
    By amy22x3 in forum Excel General
    Replies: 4
    Last Post: 03-26-2008, 11:23 PM
  4. Programming a Find Loop?
    By mcbain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2008, 04:44 AM
  5. Extracting combinations of letters from within a word
    By vicmtl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2007, 11:25 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