I have a column with sample data(duplicate):
A10
B20
C30
A10
C30
C30
...
I want to replace each value with ID hold in other columns:
A10 - ID1
B20 - ID2
C30 - ID3
I have to many id’s to do this with the ordinary replace. Is there a tricky way to do this or I should use other technique (like move the data in some program language and to do the replacement there).
Thank you in advance.
Joro
You can do it without any VBA, using
VLOOKUP. Put all your key/value pairs in a 2-column array, e.g., D1:E3. Assuming your column of data starts in A1, put this formula in column B1:then copy-paste down.
If not all your original values are mapped into a new ID, the VLOOKUP will return ‘#N/A’. If you want to keep the original values for these, your formula will be a bit more complex: