=IF(LEN(D7)>9,MID(D7,1,8)&MID(D7,11,100),MID(D7,1,7)&MID(D7,10,100))
If your max characters is 10, you may use this one.
=IF(LEN(D7)>9,MID(D7,1,8),MID(D7,1,7))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
=IF(LEN(D7)>9),REPLACE(D7,9,10,""),REPLACE(D7,8,9, "")
Hello, this is the logic:
If the length of the D7 is longer than 9 characters, replace the 9th and 10th character with "", if not, replace the 8th and 8th position with "".
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
The second number is the number of characters to replace, not the ending position, so it would be:
=IF(LEN(D7)>9,REPLACE(D7,9,2,""),REPLACE(D7,8,2, ""))
or:
=,REPLACE(D7,IF(LEN(D7)>9,9,8),2,"")
This was so helpful thank you so much!