We have the best selection of high-quality, free online crossword puzzles. RndCheck = Application.Crossword puzzles are ideal for people who love words, general knowledge, and testing their problem-solving skills. SDat(c - MinCol, r - MinRw) = c & "-" & rįor i = LBound(dRnd, 1) To UBound(dRnd, 1)įor j = LBound(dRnd, 2) To UBound(dRnd, 2) ReDim sDat(MaxCol - MinCol, MaxRw - MinRw) ReDim dRnd(MaxCol - MinCol, MaxRw - MinRw) S3(j - 1) = s2(Application.Match(Application.Large(s1, j), s1, 0) - 1)įunction GetFromToMatrix(MinCol, MaxCol, MinRw, MaxRw) As String() S1 = Array(Rnd, Rnd, Rnd, Rnd, Rnd, Rnd, Rnd, Rnd) 'Determine min&max start column, taken from the direction (Rows) of the word 'Determine the maximum & minimum start row & column If StartClIn.Offset((t - 1) * dirRin, (t - 1) * dirCin).Value = "" Or StartClIn.Offset((t - 1) * dirRin, (t - 1) * dirCin).Value = c Thenįunction GetDirectionParams(WrdIn As String, SrchRngIn As Range, DirectionIn As String) As Dictionary 'RngA.Sort Key1:=wrdRng, Header:=xlNo, SortOn:=xlSortOnValues, Order:=xlAscendingįunction WordFits(WrdIn As String, StartClIn As Range, dirRin As Integer, dirCin As Integer) As Boolean Set RngA = srchSht.Range(wrdRng, wrdRng.End(xlDown)) 'Generate randomized letters in blank spaces StartInputWords.Offset(i, 3) = StartCl.Address & " " & DirList(d) WrdRng.Offset(i - CantPlace, 0).Value = Wrd StartInputWords.Offset(i, 3) = "CANNOT PLACE" 'Debug.Print "OK - " & StartCl.Address & " " & DirList(d) & " " & Wrd 'WordFits(WrdIn As String, SrchRngIn As Range, StartClIn As Range, dirRin as integer, dirCin as integer) 'StartCl.Value = RC -> test to see if the locations are presented ok Set StartCl = SrchRng.Cells(Val(rcAcc(0)), Val(rcAcc(1))) 'Now we have 2 randomized list: possible directions and possible start positions (written as: r-c)įor RC = LBound(NrMatrix) To UBound(NrMatrix) NrMatrix = GetFromToMatrix(ParamsDict("rStartMin"), ParamsDict("rStartMax"), ParamsDict("cStartMin"), ParamsDict("cStartMax")) NrMatrix = GetFromToMatrix(ParamsDict("rStartMin"), ParamsDict("rStartMax"), ParamsDict("cStartMax"), ParamsDict("cStartMin")) NrMatrix = GetFromToMatrix(ParamsDict("rStartMax"), ParamsDict("rStartMin"), ParamsDict("cStartMin"), ParamsDict("cStartMax")) NrMatrix = GetFromToMatrix(ParamsDict("rStartMax"), ParamsDict("rStartMin"), ParamsDict("cStartMax"), ParamsDict("cStartMin")) If ParamsDict("cStartMin") > ParamsDict("cStartMax") Then If ParamsDict("rStartMin") > ParamsDict("rStartMax") Then 'Debug.Print DirList(d), ParamsDict("dirR"), ParamsDict("dirC"), ParamsDict("cStartMin"), ParamsDict("cStartMax"), ParamsDict("rStartMin"), ParamsDict("rStartMax") Set ParamsDict = GetDirectionParams(Wrd, SrchRng, DirList(d)) 'Get Parameters: direction, min&max start position, etc. 'Get the randomized list of possible directions, start with the first and loop through them if needed MyWords = "perception,grandmother,revolution,expression,employment,ambition,promotion,psychology,activity,departure,information,possibility,politics,imagination,negotiation" 'List of words, comma separated, used for testing purposes Rw2 = (, StartInputWords.Column).End(xlUp).RowĪrrWords(Rw - Rw1) = StartInputWords.Offset(Rw - Rw1, 0).Value 'StartInputWords = Worksheets("Input").Range("A2") StartInputWords.Offset(0, 2).Resize(100, 1).ClearContents Set StartInputWords = Worksheets("Input").Range("A2") Set wrdRng = SrchRng.Offset(0, + 2).Resize(1, 1) Set srchSht = ThisWorkbook.Worksheets("WordSearch")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |