# Convert a Number value , can anyone help with this??

I have value xX= Browser("A").Page("B").WebElement("Confirmation Account Number").GetROProperty("innertext") and it returns a value of "987654321"

. I would like to convert that value to read "xxxxxxx21", can anyone help with this??

*** Also the number initially entered has no specific character count or restriction

• hi

do you want to get the last 2 digits? or replace the digits with 'x' except for the last 2?

• replace the digits with 'x' except for the last 2

• xX = "xxxxxxx" & right(xX,2)

if the length of Xx is unknown, find it with len (Xx) and loop

• For i = 1 to len(Xx) - 2

a = a & "x"

next

xX = a & right (xX, 2)

• `So I can get the courage`

Variable= Right(Variable,2)

• My 1C here:

Alternative, define a lib function and use it always at ease.

strString = "987654321"'Enter any string value here

'strString = xX 'Here this is the value (from above)
msgbox strG ' The string strG has masked value: "XXXXXXX21"
'========================================
'------------------------------------
'output: String with masked value except last 2 chars
'------------------------
If str = "" Then
Exit Function
End If
L = Len(str)
If L < 3 Then
Exit Function
End If

T = ""
Last2 = Mid(str,L-1,2)

for i = 1 to L-2
T = T&"X"
Next