I'm relatively new to Excel I'm wondering if there is a formula i can use
that replaces the last four numbers in a sequence with quot;Xquot; no matter the
length of the sequence eg:
149876 14xxxx
1234789 123xxxx
This is not like the social security number where the amount of numbers is
fixed they are varying lengths. Thank you
one way would be
=REPLACE(A1,LEN(A1)-3,4,quot;xxxxquot;)--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=522896=left(trim(a1),len(a1)-4)amp;quot;xxxxquot;
quot;davidsquot; wrote:
gt; I'm relatively new to Excel I'm wondering if there is a formula i can use
gt; that replaces the last four numbers in a sequence with quot;Xquot; no matter the
gt; length of the sequence eg:
gt;
gt; 149876 14xxxx
gt; 1234789 123xxxx
gt;
gt; This is not like the social security number where the amount of numbers is
gt; fixed they are varying lengths. Thank you
Apologies I need it to replace the first four digits with X
eg Account number = 123456 outcome I require is XXXX56
quot;daddylonglegsquot; wrote:
gt;
gt; one way would be
gt;
gt; =REPLACE(A1,LEN(A1)-3,4,quot;xxxxquot;)
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=522896
gt;
gt;
Try
=REPLACE(A1,1,4,quot;xxxxquot;)--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=522896Just alter daddylonglegs formula
From =REPLACE(A1,LEN(A1)-3,4,quot;xxxxquot;) Last 4
To =REPLACE(A1,1,4,quot;xxxxquot;) First 4
George
davids wrote:
gt; Apologies I need it to replace the first four digits with X
gt; eg Account number = 123456 outcome I require is XXXX56
gt;
gt; quot;daddylonglegsquot; wrote:
gt;
gt;
gt;gt;one way would be
gt;gt;
gt;gt;=REPLACE(A1,LEN(A1)-3,4,quot;xxxxquot;)
gt;gt;
gt;gt;
gt;gt;--
gt;gt;daddylonglegs
gt;gt;------------------------------------------------------------------------
gt;gt;daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt;gt;View this thread: www.excelforum.com/showthread...hreadid=522896
gt;gt;
gt;gt;
- Aug 07 Thu 2008 20:45
replace numbers with X
close
全站熱搜
留言列表
發表留言