X = 1 For a = 1 To 9 For b = 1 To 9 For c = 1 To 9 For d = 1 To 9 For e = 1 To 9 For f = 1 To 9 For g = 1 To 9 For h = 1 To 9 For i = 1 To 9 If a <> b And a <> c And a <> d And a <> e And a <> f And a <> g And a <> h And a <> i And b <> c And b <> d And b <> e And b <> f And b <> g And b <> h And b <> _ i And c <> d And c <> e And c <> f And c <> g And c <> h And c <> i And d <> e And d <> f And d <> g And d <> h And d <> i And e <> f And e <> g And e <> h And e <> _ i And f <> g And f <> h And f <> i And g <> h And g <> i And h <> i Then Cells(X, 5) = Cells(a, 2) & Cells(b, 2) & Cells(c, 2) & Cells(d, 2) & Cells(e, 2) & Cells(f, 2) & Cells(g, 2) & Cells(h, 2) & Cells(i, 2) X = X + 1 End If Next Next Next Next Next Next Next Next Next
Range("E1").Select Application.CutCopyMode = False Range(Selection, Selection.End(xlDown)).Select ActiveSheet.Range("$E$1:$E$362880").RemoveDuplicates Columns:=1, Header:= _ xlNo Range("A1").Select Application.Calculation = xlCalculationAutomatic End Sub
#9 Enig med dig acore, men det er Mathes første spørgsmål i Eksperten, så måske er han ikke helt klar over at det er god stil at reagere på de forslag der kommer - uanset om de er brugbare eller ej.
Synes godt om
1 synes godt om dette
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.