Dear all,
I need a help with putting my code into loop because my procedure is too long and I don't know how to do that :/. I have many cells that can be user modifiable and 5 different options (countries). Aim is that when user changes value of one cell (e.g. C14) for particular option in one sheet, that this value 'goes' into the 'Data sheet'.
Sample of my code is below. I have many more lines like this. Thank you very much for your help!!!
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$14" Then If IsNumeric(Target.Value) And Range("P5") = 1 Then Worksheets("Data Sheet").Range("C53").Value = Target.Value End If End If If Target.Address = "$C$15" Then If IsNumeric(Target.Value) And Range("P5") = 1 Then Worksheets("Data Sheet").Range("C54").Value = Target.Value End If End If If Target.Address = "$C$16" Then If IsNumeric(Target.Value) And Range("P5") = 1 Then Worksheets("Data Sheet").Range("C55").Value = Target.Value End If End If If Target.Address = "$C$17" Then If IsNumeric(Target.Value) And Range("P5") = 1 Then Worksheets("Data Sheet").Range("C56").Value = Target.Value End If End If