Not sure if this is possible.

G

Greg

I have an excel document with credit card numbers and it is possible for me
to to only show the first 4 and last 4 numbers and mask what is between.

For example, my credit card number is :1111-2222222-3333 and I want to be
able to show 1111-XXXXXXX-3333. Is this possible?
 
L

L. Howard Kittle

Hi Greg,

Perhaps this will work for you.

=LEFT(M1,5)&M2&RIGHT(M1,5)

Where M1 has the credit card number in it.
Where M2 has xxxxxxx in it.

HTH
Regards,
Howard
 
G

Greg

Sadly, I think I have done something wrong. Am I understanding correctly?
For example, my cell my input was:

=LEFT(1111111111111111,5)&X&RIGHT(1111111111111111,5)
 
A

Alan

I think you have misunderstood Howards reply which will do what you wish.
Try this, put your example,

1111-XXXXXXX-3333

in A1, in B1 copy and paste this,

=LEFT(A1,4)&"XXXXXX"&RIGHT(A1,4)

Howards reply was using a seperate cell for XXXXXX

Regards,
Alan.
 
G

Greg

Okay I revised my formula as shown below.

=LEFT(M2,4)&"XXXXXXXX"&RIGHT(M2,4)

the result is 4500XXXXXXXX. Shouldn't I be able to see the last 4 digits
also?
 
J

JoeU2004

Greg said:
my credit card number is :1111-2222222-3333 and I want
to be able to show 1111-XXXXXXX-3333.

=LEFT(A1,5) & REPT("X",LEN(A1)-10) & RIGHT(A1,5)


----- original message -----
 
J

JLatham

Just to clarify - I realize you have a good solution from Tethless mama. But
if your full credit card number was in cell M2, then the formula
=LEFT(M2,4) & "xxxxxxxx" & Right(M2,4)
should have displayed "4500xxxxxxxx1234" assuming that M2 contained
4500-1234567-1234
But!! if the cell with the formula wasn't wide enough to show all of that
and there is something in the cell immediately to its right has something in
it, then some of the results could be hidden.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top