I haven't requested any help on my Sudoku game because it's finished and ready, but I like to play those on my cell phone and it has a feature I would like to add so attached is my request and I'm sure it will be easy for someone to solve.
I haven't requested any help on my Sudoku game because it's finished and ready, but I like to play those on my cell phone and it has a feature I would like to add so attached is my request and I'm sure it will be easy for someone to solve.
As your attachment can very not handle any VBA procedure
Marc L , please explain what your mean.
The workbook file format
Anyway according to your attachment a beginner level starter with a worksheet event VBA procedure
so to paste only to the Sheet1 worksheet module :
PHP Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With [B2:S10]
.Interior.ColorIndex = xlNone
If Intersect(Target(1), .Cells) Is Nothing Or (Target(1).Column And 1) = 0 Then Exit Sub
Select Case Target(1).Column
Case Is < 8: C = 2
Case Is < 14: C = 8
Case Else: C = 14
End Select
Select Case Target(1).Row
Case Is < 5: R = 2
Case Is < 8: R = 5
Case Else: R = 8
End Select
Union(.Columns(Target(1).Column - 1), .Rows(Target(1).Row - 1), Cells(R, C).Resize(3, 6)).Interior.ColorIndex = 20
End With
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » ! ◄ ◄
According to your attachment an Excel basics variation to paste only to the Sheet1 worksheet module :
![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) With [B2:S10] .Interior.ColorIndex = xlNone If Intersect(Target(1), .Cells) Is Nothing Or (Target(1).Column And 1) = 0 Then Exit Sub Union(.Columns(Target(1).Column - 1), .Rows(Target(1).Row - 1), _ Cells(Application.Lookup(Target(1).Row, [{2,5,8}]), Application.Lookup(Target(1).Column, [{2,8,14}])) _ .Resize(3, 6)).Interior.ColorIndex = 20 End With End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » ! ◄ ◄
Used the first example and it works, Thanks,
Thanks for the rep' !
And both work as expected
Yes, both work
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks