Replacing value with ID if matching another value
-
04-12-2019 - |
Question
I have three columns:
A B C 1 TextOne TextOne 10 2 TextOne TextTwo 11 3 TextTwo 4 TextTwo 5 TextOne 6 TextTwo
Applying the formula below I was expecting the result 10
:
=IF(ISNA(VLOOKUP(A1,$B$1:$C$2,2,FALSE)),"0",VLOOKUP(A1,$B$1:$C$2,2,FALSE))
but I am seeing NA
and suspect this is connected with the format of the cells.
Where am I going wrong?
Solution
The issue was initially caused because I was trying to replace the value in cell applying the formula in the same cell.
As @datooo points in his comments:
Once the formula is entered the value you are looking up is gone
OTHER TIPS
To ‘overwrite’ TextOne
with 10
the simplest solution may be to filter ColumnA to select TextOne
, enter 10
and copy down (change filter selection and repeat for TextTwo
/ 11
if required).
For a 'high volume' requirement (lots of replacements) use VLOOKUP (eg as in question) in a separate column and copy that column's results over the top of ColumnA with Paste Special Values.