title: Copy adjacent cell from offset row based on a dynamic value
body: <p>I had posted something similar earlier, thought I had it, and deleted my post.  Ugh.  So, here's what I'm trying to accomplish:</p>
  
  <ul>
  <li>If the variables are equal c = d (comparing two loops), then locate the correct d value location (column/row) on the sheet</li>
  <li>Copy the d value from the cell into a specified range on another sheet .end(xlup).offset(1,0) ----this works fine</li>
  <li>Copy the adjacent cell value a few rows from the d value (offset 0,-16)</li>
  </ul>
  
  <p>I can't get the offset value correctly.  It's giving me the range1 R3 value instead.</p>
  
  <p>suggestions?</p>
  
  <p>example:</p>
  
  <pre><code>Set range1 = wbk1.Worksheets(1).Range(R3:R20)
  Set range2 = wbk2.worksheets(2).Range("N" &amp; .Rows.Count).End(xlup).Offset(1,0)
  Set range3 = wbk2.worksheets(2).Range("O" &amp; .Rows.Count).End(xlup).Offset(1,0)
  Set range4 = range1.Offset(0,-16)
  For Each c in g.keys
       For Each d in range1 
            If c = d Then 
                 range2.Value = d  
                 range3.value = range4.value  (this isn't working)
            End If
       Next d
  Next c
  </code></pre>
  
  <p>Final Code:</p>
  
  <pre><code>Set rngchassIP = wbkJackPot.Worksheets(1).Range("R3:R30") 
  Set rngchassCS = wbkVer.Worksheets("Cutsheets").Range("M2:M5")
  Set rngchassyver = wbkVer.Worksheets("Cutsheets").Range("N" &amp; .Rows.Count).End(xlUp).Offset(1, 0)
  Set rngchassypst = wbkVer.Worksheets("Cutsheets").Range("O" &amp; .Rows.Count).End(xlUp).Offset(1, 0)
  
  
  For Each c In rngchassCS               
      For Each w In rngchassIP           
          If c = w Then                   
              rngchassyver.Value = w      
              rngchassypst.Value = w.Offset(0, -16)
          End If
      Next w
  Next c
  </code></pre>
  
  <p>The root of the issue is that once the value/position of w is identified, I need to grab the offset(0,-16) from that cell and put that in "O".  I've tried a few different ways, but I'm just not seeing it... ugh.  Help please!</p>