I'm trying to create a formula or macro in excel that replaces various values in a single column to return a specific text. I was able to create a substitution formula that worked for 1 specific text value, the problem is that i need one formula for 36 text values to be substituted with 27 text values. I figured VBA would help me with this, but i'm a complete novice with VBA.
for example, i have the old text values in the right hand column and the new text values in the left hand column. Most of my values are 1:1 with the exception of "orange" which has 10 values that all need to show up as "orange." i tried recording a macro by using a substitution formula for each cell, but i have almost 1700 cells in my column that need to be substituted with the correct value. is there a way that VBA can do this for me? I know the coding for it must be massive and I'm not smart enough to figure it out

If you can repeat that
orangevalue down to the blank rows then this is doable with a formula.Consider the following data in A1:B8
And in cell
D1you have the following string:In cell
E1you can drop this formula and it will do the replacement of all the numbers:outputting:
Reduce()is a cool function that will feed an initial value (D1in this case) and an array (A1:A8) into a function and collect the results back to spit out the final product. The function in this case is aLAMBDAthat callsSUBSTITUTE()with that D1 value and the array. You can kind of think of it as building a deeply nestedSubstitute(Substitute(Substitute()))type formula dynamically.