title: Changing cell when a cell next to it changes
body: <p>Consider there are three columns in a sheet.
  <a href="https://i.stack.imgur.com/iQJrh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iQJrh.png" alt="enter image description here" /></a></p>
  <p>If there is any change in columns B or D then the data should be printed in column E only for the changed row.</p>
  <p>Conditions are:</p>
  <ul>
  <li>if B = Process and D = ADD then in E = MfgddnS,</li>
  <li>if B = Process and D = REMOVE then in E = MetrhS,
  <ul>
  <li>ELSE NOTHING,</li>
  </ul>
  </li>
  <li>if B = TOOL and D = ADD then in E = Mfgd,</li>
  <li>if B = TOOL and D = REMOVE then in E = Met,
  <ul>
  <li>ELSE NOTHING.</li>
  </ul>
  </li>
  </ul>
  <p>I managed to make that happen by clicking the button, not automatically, also it changes every cell in the column E, not in the changed row only. So, if you got any idea mention it.</p>
  <pre class="lang-vb prettyprint-override"><code>Sub effected()    
      Dim R As Long, Ws As Worksheet
      
      Set Ws = Worksheets(&quot;Sheet1&quot;)
      
      For R = Ws.Cells(Rows.Count, &quot;A&quot;).End(xlUp).Row To 2 Step -1
          If Ws.Range(&quot;B&quot; &amp; R).Value = &quot;Process&quot; And Ws.Range(&quot;D&quot; &amp; R).Value = &quot;ADD&quot; Then
              Ws.Range(&quot;E&quot; &amp; R).Value = &quot;MfgddnS&quot;
              Ws.Range(&quot;E&quot; &amp; R).Interior.ColorIndex = 41
          ElseIf Ws.Range(&quot;B&quot; &amp; R).Value = &quot;Process&quot; And Ws.Range(&quot;D&quot; &amp; R).Value = &quot;REMOVE&quot; Then
              Ws.Range(&quot;E&quot; &amp; R).Value = &quot;MetrhS&quot;
              Ws.Range(&quot;E&quot; &amp; R).Interior.ColorIndex = 6
          ElseIf Ws.Range(&quot;B&quot; &amp; R).Value = &quot;Process&quot; And Ws.Range(&quot;D&quot; &amp; R).Value = &quot;MODIFY&quot; Then
              Ws.Range(&quot;E&quot; &amp; R).Value = &quot;qeth&quot;
              Ws.Range(&quot;E&quot; &amp; R).Interior.ColorIndex = 8
          Else
              Ws.Range(&quot;E&quot; &amp; R).Value = &quot;NOTHING&quot;
              Ws.Range(&quot;E&quot; &amp; R).Interior.ColorIndex = 4
          End If
      Next R
  End Sub
  </code></pre>