Trying to complete a macro to pull data from one worksheet to update erroneous data on another. There are three columns to work with, and for the first two columns, the code works just fine. For the final column, the macro cycles through the first If statement with no trouble, but returns the vlookup formula, not the value, for the following two Else If statements. The format of all columns appears to be text, though I have formatted it within the macro as well to make sure. But with or without the formatting, I get the same result:
Any assistance would be welcome.
Code:
Range("K:K").NumberFormat = "@"
Range("K2").Select
Do While Not IsEmpty(ActiveCell.Offset(0, 3))
If ActiveCell.Offset(0, 3) = "A" Then
ElseIf ActiveCell.Offset(0, 3) = "I" Then
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-10],DFLT,8,0)"
ElseIf ActiveCell.Offset(0, 3) = "C" Then
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-10],DFLT,8,0)"
End If
ActiveCell.Offset(1, 0).Select
Loop
Any assistance would be welcome.