May 26, 2006 #1 lenebene Programmer Sep 24, 2002 15 US I am having a problem adding leading zeros to an account. Example: RTF-123 Should look like this - RTF-00123 RRR-12 Should look like this - RRR-00012 Any help would be greatly appreciated. Thanks!
I am having a problem adding leading zeros to an account. Example: RTF-123 Should look like this - RTF-00123 RRR-12 Should look like this - RRR-00012 Any help would be greatly appreciated. Thanks!
May 26, 2006 #2 S SkipVought Programmer Dec 4, 2001 47,492 US Hi, I assume that you are CONCATENATING a number with text [tt] =YourText&Text(YourNumber,"00000") [/tt] Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… POULTRY in motion to PULLET for a PALTRY amount! Upvote 0 Downvote
Hi, I assume that you are CONCATENATING a number with text [tt] =YourText&Text(YourNumber,"00000") [/tt] Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… POULTRY in motion to PULLET for a PALTRY amount!
May 26, 2006 #3 xlhelp Instructor Dec 7, 2001 2,976 CA I presume Excel is what you are looking for If your account number is in cell A2, then =LEFT(A2,FIND("-",A2))&"000"&RIGHT(A2,LEN(A2)-FIND("-",A2)) Upvote 0 Downvote
I presume Excel is what you are looking for If your account number is in cell A2, then =LEFT(A2,FIND("-",A2))&"000"&RIGHT(A2,LEN(A2)-FIND("-",A2))
May 26, 2006 Thread starter #4 lenebene Programmer Sep 24, 2002 15 US Sorry. Yes it was excel! Thank you xlhelp. I was able to get yours to work... I must be brainless today because I couldn't get Skips to work.. Thanks again! Upvote 0 Downvote
Sorry. Yes it was excel! Thank you xlhelp. I was able to get yours to work... I must be brainless today because I couldn't get Skips to work.. Thanks again!
May 26, 2006 #5 S SkipVought Programmer Dec 4, 2001 47,492 US xlbo's works of you already have the string put together. Mine works putting the string together from scratch. Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… POULTRY in motion to PULLET for a PALTRY amount! Upvote 0 Downvote
xlbo's works of you already have the string put together. Mine works putting the string together from scratch. Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… POULTRY in motion to PULLET for a PALTRY amount!