Nov 08 2018 05:12 AM
I am trying to take a location number ( example L4027) and have it appear in the cell as L4-027. Is there a formula that I could use to do this?
Nov 08 2018 06:37 AM
Hi
The text is in cell A1. Formula in B1:
=REPLACE(A1,2,0,"-")
Nov 08 2018 07:02 AM
Wow! Thank you for showing me this. If I had one more cell similar to the previous question. Example - L4037B and I wanted it to appear as L4-037-B, using the previous equation leaves the B as this L4-037B. Is there another command that I need to place into the equation?
Nov 08 2018 07:37 AM
SolutionThen it would be:
=REPLACE(IF(LEN(A2)=6,REPLACE(A2,6,0,"-"),A2),3,0,"-")
Nov 08 2018 07:37 AM
SolutionThen it would be:
=REPLACE(IF(LEN(A2)=6,REPLACE(A2,6,0,"-"),A2),3,0,"-")