I currently use the formula
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(LEFT(RC[-2],5)=""DAVID"",""DAVIDE"","""")))))"
but I would like to be able to put something like this, only I don't know the correct way:
If Range(B2).value (LEFT(RC[-2],5) = "DAVID"
Range("D2").value ="DAVIDE"
else
Range("D2").value =""
end if
Can you help me?
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(LEFT(RC[-2],5)=""DAVID"",""DAVIDE"","""")))))"
but I would like to be able to put something like this, only I don't know the correct way:
If Range(B2).value (LEFT(RC[-2],5) = "DAVID"
Range("D2").value ="DAVIDE"
else
Range("D2").value =""
end if
Can you help me?