title: double click copy contents of adjacent cell
body: <p><a href="https://i.stack.imgur.com/oSIJo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oSIJo.jpg" alt="enter image description here" /></a></p>
  <p>I need a simple code which will copy contents of adjacent left cell to double clicked cell. This is to help me in making entries as in attached image.</p>
  <p>If I click <code>c2</code> it should copy 3 from <code>b2</code> and paste it in <code>c2</code>, and it should do it for <code>c2: c100</code></p>
  <pre><code>Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  
      Dim wb As Workbook: Set wb = ThisWorkbook
      Dim ws1 As Worksheet: Set ws1 = wb.Worksheets(&quot;sheet1&quot;)
  
      With ws1
          If Not Intersect(Target, Range(&quot;b2:b100&quot;)) Is Nothing Then
              Cancel = True
  
              If Application.CountIf(Sheets(ws1).Range(&quot;b2:b100&quot;), Target.Value) = 0 Then
                  Cells(Target.Row, 3).Value = Target.Value
              
              End If
          End If
      End With
  End Sub
  </code></pre>