Hi, so what I've been trying to do without success is to make excell automatically replace the content of a cell if it's in column "B" and its value has just been changed to "Distribute".
Then, if the content of the cell in the same row but in column E is empty the value to replace "Distribute" will be copied from cell M22 in another worksheet.
Or, If the content of the cell in the same row but in column E is NOT empty the value to replace "Distribute" will be copied from cell M24 in another worksheet.
How should I proceed to make it happen?
Thanks in advance!
Ps: I did'nt get to the part where I would copy different values after checking the column E.
The code I was trying is the following:
Private Sub Worksheet_Change2(ByVal Target As Range)
Dim s1 As Worksheet, s2 As Worksheet, thiscolumn As Long, thisrow As Long
Set s1 = Sheets("Control")
Set s2 = Sheets("Graph")
If Not Intersect(Target, Range("B:B")) Is Nothing Then
thisrow = Target.Row
thiscolumn = Target.Column
If InStr(1, Range(Cells(thisrow, thiscolumn)), "Distribute") Then
s1.Range(Cells(thisrow, thiscolumn)).PasteSpecial x1PasteValues