Hello
I have an Excel spreadsheet that will be used for data entry without userforms (to allow for Mac users). I intend on password protecting it to make data entry easier. It works as I hope however I found the code on the internet and whilst it works I don't quite understand one line of code so hoping someone can help.
In the cell change VBA code, I've put
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E5:H9")) Is Nothing And Range("B4").Value = False And Range("B3").Value = False Then
Cells(Range("B2").Value, Cells(Target.Row, Target.Column + 8).Value).Value = Target.Value
End If
End Sub
What does the + 8 stand for? If I have a differently formatted sheet I want to understand what I might need to replace the 8 with. Any guidance is appreciated.
I have an Excel spreadsheet that will be used for data entry without userforms (to allow for Mac users). I intend on password protecting it to make data entry easier. It works as I hope however I found the code on the internet and whilst it works I don't quite understand one line of code so hoping someone can help.
In the cell change VBA code, I've put
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E5:H9")) Is Nothing And Range("B4").Value = False And Range("B3").Value = False Then
Cells(Range("B2").Value, Cells(Target.Row, Target.Column + 8).Value).Value = Target.Value
End If
End Sub
What does the + 8 stand for? If I have a differently formatted sheet I want to understand what I might need to replace the 8 with. Any guidance is appreciated.