SUBSTITUTE Function - 3 Digit Problem, Only Checks First 2 Digits.

milona

New Member
Joined
Apr 12, 2018
Messages
1
Hello,

I'm using substitute nested many times to turn formulas with cell references into equations with text. It's a multipart process starting with a formula-to-text function generating a secondary array, some other stuff, and then a huge string of nested substitute functions generating a third array with the equations.

However, substitute seems to only reference the first two digits regardless of what i do.

For instance running =SUBSTITUTE(SUBSTITUTE(E8,"c14"," yes"),"c144", "no") on two cells, one with c14 and one with c144 properly returns yes for the first, but for the second returns yes4. So it seems to be only evaluating the first two digits, falsely recognizing the second cell as "c14" replacing that and leaving the additional 4.

Is there a solution to this problem? Any help would be greatly appreciated.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to Mr Excel forum

For the example you've showed this works
=SUBSTITUTE(SUBSTITUTE(E8,"c144","no"),"c14", "yes")

M.
 
Upvote 0
If you really want an answer to this exact question we can provide it, but I'm sure there's a better approach to your ultimate goal that doesn't even require substitute.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top