I'm trying to create an Excel document where I have filled cells (the related number of cells is different, some only 1 others 10+, columns are the same number)
I want to make a selection of "activeCell area". So e.g. if the active cell is A11 then the filled area from A11 and all the way to E14 is selected (all blue cells).
This is what I currently got, I assume I need a while loop, but I can't get it to work:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Target.Worksheet.Range("N5:N1000")) Is Nothing Then
If Cells(Target.Row, 1).Interior.ColorIndex <> xlNone Then
If Cells(Target.Row, 14) = "x" Or Cells(Target.Row, 14) = "X" Then
Range("A" & ActiveCell.Row).Select
End If
End If
End If
End Sub