Credit Card Number Suppression

D

Dana

I have an existing workbook that contains a confirmation
that gets faxed to customers to sign off approving credit
card charges. The credit card # is typed on an internal
document which populates some of the cells on the form
that faxes over to the customer. We need to change the
translation so that only the last 4 digits show as
numbers and the rest of the credit card number shows as #
sign.

Any help available?
 
K

Kevin Stecyk

Dana,

Assume credit card number is in A1 and has 16 numbers/characters.

One way...

="#### #### #### " & Right(A1, 4)


All you are doing here is manually adding the #### characters and then
appending the four right most characters of A1.

Hope that helps.

Regards,
Kevin
 
K

Kevin Stecyk

Dana,

Another way (same assumptions as previous message).

=replace(A1,1,12,#)

You are replacing the first 12 characters (might need more if spaces in
text?), with # sign.

Regards,
Kevin
 
P

Peo Sjoblom

Just remember that excel only has 15 digits precision so the last digit will
always be a zero,
so to get 16 digits it has to be text and the formatting won't work

="#### #### #### "&RIGHT(A1,4)

or something similar
 
K

Kevin Stecyk

Peo,

Agreed. :)

Regards,
Kevin



Peo Sjoblom said:
Just remember that excel only has 15 digits precision so the last digit will
always be a zero,
so to get 16 digits it has to be text and the formatting won't work

="#### #### #### "&RIGHT(A1,4)

or something similar

--

Regards,

Peo Sjoblom
 
G

Guest

I truly am confused now. We have a workbook, so this
formula is on another sheet that is linked to the one
that we want the ### to show on. So example:

Sheet name is Info and the cell is G16 (this is the whole
cc number)

Confirming is the name of the sheet we are faxing and
want the last 4 only to show up on. In reviewing the
answers given to me I'm not quite sure if you've given me
generic cell #'s or if these things have to do with what
character to replace with a # and what character to
actually show the number. Help!

Thanks.
 
J

J.E. McGimpsey

Copy the formula below and paste this into your cell on sheet
"Confirm":

=REPT("#### ",3) & RIGHT(Info!G16,4)

The REPT(...) function simply produces a 15 character string:

####_####_####_

where _ represents a space. The Info!G14 refers to your cell that
contains the cc number.
 

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

Top