Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default masking with symbol xxxx

hi community

kindly can anybody assist me in these task...

i hv following numbers sequence and wanted to mask the middle number with
symbol xxxx

example:

number: to masked

4556-1234-2345-1234 to 4556-xxxx-xxxx-1234

0377-0123-1234-1234 to 0377-xxxx-xxxx-1234

082-012345-1 to 082-xxxxxx-1


what i did was i use the mid function to extract and later do concatenating
of cells, is there any way that can help me to improvise the masking ??

&

and for the 2nd set of number, when I use concatenation, the zero digit in
front does not appear.



thanks community for the kind assistance given

:)


--
oldLearner57
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default masking with symbol xxxx

When you say "masking", do you mean you are physically changing the value in
the cell so that the original value no longer exists? Or are you just
placing the "mask" in a separate cell while retaining the original value in
the original cell? Also, are you allowed to use VB code (macros or UDF) in
your workbook?

Rick


"oldLearner57" wrote in message
...
hi community

kindly can anybody assist me in these task...

i hv following numbers sequence and wanted to mask the middle number with
symbol xxxx

example:

number: to masked

4556-1234-2345-1234 to 4556-xxxx-xxxx-1234

0377-0123-1234-1234 to 0377-xxxx-xxxx-1234

082-012345-1 to 082-xxxxxx-1


what i did was i use the mid function to extract and later do
concatenating
of cells, is there any way that can help me to improvise the masking ??

&

and for the 2nd set of number, when I use concatenation, the zero digit in
front does not appear.



thanks community for the kind assistance given

:)


--
oldLearner57


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default masking with symbol xxxx

hi

the set of number will be change to

example

4556-1234- 2345-1234 to 4556-xxxx-xxxx-1234

and the rest similar format

is there any simple way besides doing macro?

much appreciated for the assistance

:)

thanks community
--
oldLearner57


"Rick Rothstein (MVP - VB)" wrote:

When you say "masking", do you mean you are physically changing the value in
the cell so that the original value no longer exists? Or are you just
placing the "mask" in a separate cell while retaining the original value in
the original cell? Also, are you allowed to use VB code (macros or UDF) in
your workbook?

Rick


"oldLearner57" wrote in message
...
hi community

kindly can anybody assist me in these task...

i hv following numbers sequence and wanted to mask the middle number with
symbol xxxx

example:

number: to masked

4556-1234-2345-1234 to 4556-xxxx-xxxx-1234

0377-0123-1234-1234 to 0377-xxxx-xxxx-1234

082-012345-1 to 082-xxxxxx-1


what i did was i use the mid function to extract and later do
concatenating
of cells, is there any way that can help me to improvise the masking ??

&

and for the 2nd set of number, when I use concatenation, the zero digit in
front does not appear.



thanks community for the kind assistance given

:)


--
oldLearner57



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default masking with symbol xxxx

If you want to change the contents of a cell that is not the result of a
formula, then no, you will have to use VBA. A cell can either contain data
or a formula, but not both. If you are manually putting those values into
the cell, then there cannot be a formula in that cell too. Here is a macro
that will change all values in a selection the way you asked for...

Sub ReplaceWithXs()
Dim X As Long
Dim R As Range
Dim Parts() As String
For Each R In Selection
Parts = Split(R.Value, "-")
For X = 1 To UBound(Parts) - 1
Parts(X) = String(Len(Parts(X)), "X")
Next
R.Value = Join(Parts, "-")
Next
End Sub

Rick


"oldLearner57" wrote in message
...
hi

the set of number will be change to

example

4556-1234- 2345-1234 to 4556-xxxx-xxxx-1234

and the rest similar format

is there any simple way besides doing macro?

much appreciated for the assistance

:)

thanks community
--
oldLearner57


"Rick Rothstein (MVP - VB)" wrote:

When you say "masking", do you mean you are physically changing the value
in
the cell so that the original value no longer exists? Or are you just
placing the "mask" in a separate cell while retaining the original value
in
the original cell? Also, are you allowed to use VB code (macros or UDF)
in
your workbook?

Rick


"oldLearner57" wrote in message
...
hi community

kindly can anybody assist me in these task...

i hv following numbers sequence and wanted to mask the middle number
with
symbol xxxx

example:

number: to masked

4556-1234-2345-1234 to 4556-xxxx-xxxx-1234

0377-0123-1234-1234 to 0377-xxxx-xxxx-1234

082-012345-1 to 082-xxxxxx-1


what i did was i use the mid function to extract and later do
concatenating
of cells, is there any way that can help me to improvise the masking ??

&

and for the 2nd set of number, when I use concatenation, the zero digit
in
front does not appear.



thanks community for the kind assistance given

:)


--
oldLearner57




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default masking with symbol xxxx

=LEFT(A1,FIND("-",A1))&SUBSTITUTE(REGEX.SUBSTITUTE(TRIM(MID(SUBSTI TUTE(A1,"-",REPT("
",99)),6,(LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))*99)),"[0-9]","x"),"
","-")&"-"&TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99)),99))


"oldLearner57" wrote:

hi

the set of number will be change to

example

4556-1234- 2345-1234 to 4556-xxxx-xxxx-1234

and the rest similar format

is there any simple way besides doing macro?

much appreciated for the assistance

:)

thanks community
--
oldLearner57


"Rick Rothstein (MVP - VB)" wrote:

When you say "masking", do you mean you are physically changing the value in
the cell so that the original value no longer exists? Or are you just
placing the "mask" in a separate cell while retaining the original value in
the original cell? Also, are you allowed to use VB code (macros or UDF) in
your workbook?

Rick


"oldLearner57" wrote in message
...
hi community

kindly can anybody assist me in these task...

i hv following numbers sequence and wanted to mask the middle number with
symbol xxxx

example:

number: to masked

4556-1234-2345-1234 to 4556-xxxx-xxxx-1234

0377-0123-1234-1234 to 0377-xxxx-xxxx-1234

082-012345-1 to 082-xxxxxx-1


what i did was i use the mid function to extract and later do
concatenating
of cells, is there any way that can help me to improvise the masking ??

&

and for the 2nd set of number, when I use concatenation, the zero digit in
front does not appear.



thanks community for the kind assistance given

:)


--
oldLearner57



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format a number (i.e. 1111111111111111) to show XXXX-XXXX-1111-11 rjbind Excel Discussion (Misc queries) 1 July 13th 07 03:45 AM
Subtotal without "xxxx total" but only xxxx ashish128 Excel Discussion (Misc queries) 3 May 2nd 06 01:07 PM
Display masking goto_guy Excel Discussion (Misc queries) 2 March 30th 06 11:38 PM
adding a ' ie 'xxxx instead of xxxx cclambie Excel Worksheet Functions 6 December 6th 05 04:25 AM
change dots to dashes in an account format (xx.xxxx.xxxx) to xx-xx Michael Excel Discussion (Misc queries) 1 July 1st 05 10:44 PM


All times are GMT +1. The time now is 09:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"