• 411K Members
• 6,077 Online
• 466K Conversations
SOLVED

## Substituting data from one column with required data from another column

Occasional Contributor

# Substituting data from one column with required data from another column

Good day everyone. I have one more question which I battle to solve. I have a column with various supplier stock codes (for example C-010, C-101, C-102). What I want is to create a column where those stock codes will be substituted with my own stock codes C-010 with G-15, C-101 with G-20, C-102 with G-25.

Is anything I can use to speed up the process?

Stock table with supplier's codesMy table where I have allocated my own stock number to each supplier's code

3 Replies
Solution

# Re: Substituting data from one column with required data from another column

You may try this...

=CHOOSE(MATCH(N2,{"C-010","C-101","C-102"},0),"G-15","G-20","G-25")

But it would be better to create a lookup table and use the VLookup formula to get the substituted value like this...

=VLOOKUP(N2,\$U\$2:\$V\$4,2,0)

Where \$U\$2:\$V\$4 is the Lookup Table.

Refer to the attached for more details.

# Re: Substituting data from one column with required data from another column

Brilliant, thanks a lot!

# Re: Substituting data from one column with required data from another column

You're welcome! Glad it worked as desired.

Thanks for the feedback!

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies