vba lookup cell value on another worksheet and rename value? <p>How to get the value from a cell on an active sheet and look it up on a non active sheet and then rename the value?</p> <pre><code>Dim rw As Long rw = ActiveCell.Row If Sheets("Home").Range("D" &amp; rw).Value = "Tender" Then With Worksheets("Time Allocation").Columns("B:B") Set cell = .Find(What:=.Range("B" &amp; rw).Value, After:=Range("B" &amp; rw), LookIn:=xlFormulas, _ LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not cell Is Nothing Then cell.Value = "test" Else cell.Value = "test" End If End With End If </code></pre> <p>I have tried using cell.value = "test" but this causes an error: object variable or block with variable not set</p> <p>please can someone show me where I am going wrong?</p>