Back in 2002 Mark W gave this forumula
=REPLACE(REPLACE(A2,5,0,"-"),8,0,"-")
...to insert hyphens in the text value in cell A2.
but I need to insert three hyphens into a string of 10 numbers so that <TABLE style="WIDTH: 123pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=164 border=0 x:str><COLGROUP><COL style="WIDTH: 123pt; mso-width-source: userset; mso-width-alt: 5997" width=164><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl63 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 123pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=164 height=20>0306482320 reads as
0-306-48232-0
</TD></TR></TBODY></TABLE>
I've tried various amendments to Mark's formula but none of them are correct. Can someone help, please. Thanks.
=REPLACE(REPLACE(A2,5,0,"-"),8,0,"-")
...to insert hyphens in the text value in cell A2.
but I need to insert three hyphens into a string of 10 numbers so that <TABLE style="WIDTH: 123pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=164 border=0 x:str><COLGROUP><COL style="WIDTH: 123pt; mso-width-source: userset; mso-width-alt: 5997" width=164><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl63 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 123pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=164 height=20>0306482320 reads as
0-306-48232-0
</TD></TR></TBODY></TABLE>
I've tried various amendments to Mark's formula but none of them are correct. Can someone help, please. Thanks.
Last edited: