title: vba match and set value of column next to it
body: <p>many iterations Ive seen and googled, but I would like to change to column to the matched value row in one line, but somehow cant make it work.
  Can anyone share some thoughts on the match/vlookup formula below, and why it gives a &quot;unable to get the match property of the worksheet function class&quot; error?</p>
  <pre><code>Dim swl As Long
  Dim var1 As Long
  var1 = 3
  swl = 250
  Dim rng As Range
  Set rng = ActiveSheet.Range(&quot;g2:h8&quot;)
  
  Cells(Application.WorksheetFunction.Match(var1, rng, 1), 2).Value = swl
  '''
  </code></pre>