So...I'm totally lost about Excel programming and it'd be kinda awesome if anyone could help explain what these functions mean as well as helping me with the solution...
So, I have to make a Sudoku (9 by 9, already done) and I'm supposed to check the rows to see if they're all okay (no repeated numbers).
I'm supposed to use this:
Function checkRow(row As Integer, col As Integer, leng As Integer) As Boolean
and check these cells: Cell(row, col), Cell(row, col+1), …, Cell(row, col+leng-1)
The function should return True if the cells contain all the values 1 through leng and should return False otherwise.
Add a column at the right hand side of the Sudoku from Question 1 to display “OK” or “Not OK” beside each row. For the correct solution, it should show “OK” beside each row.
So, problem 1) I have no idea what this function means or what leng is and I have no idea what I need to input in the module so that I can use the function: checkRow.
I've tried:
Function checkRow(r As Integer, c As Integer, leng As Integer) As Boolean
Dim r As Integer, c As Integer
For Each r In Range("A1:I9").Cells(r, c)
If cell(r, c) = 1 Then
checkRow = True
Else
checkRow = False
End If
End Function
But, I don't think that's right at all...seeing as my excel worksheet keeps getting an error...
Bookmarks