Entering Credit Card Numbers

G

Guest

We need some help with something I think could probably easily be solved ..

We use a worksheet which includes a cell for a credit card number. The cell is formatted to make the number appear like this 0000 0000 0000 0000. However when we enter a credit card number in the cell it changes the last number to a zero. For example, I enter 1111 2222 3333 4444, but when I press tab it changes to 1111 2222 3333 4440. How can I make it stop doing that!? I can change it to text, but then I loose the separation between the sets of numbers

Thanks for any help you can provide.
 
H

Harald Staff

Hi

Excel deals with 15 digits "only", so either text or zeros, sorry. Enter
with a preceeding apostrophe ' to make it text without preformatting.

HTH. Best wishes Harald

Carol K said:
We need some help with something I think could probably easily be solved ....

We use a worksheet which includes a cell for a credit card number. The
cell is formatted to make the number appear like this 0000 0000 0000 0000.
However when we enter a credit card number in the cell it changes the last
number to a zero. For example, I enter 1111 2222 3333 4444, but when I
press tab it changes to 1111 2222 3333 4440. How can I make it stop doing
that!? I can change it to text, but then I loose the separation between the
sets of numbers.
 
N

Norman Harker

Hi Carol!

Excel only uses 15 digit precision so I'm afraid it will have to be
text.

However, you can enter the text without spaces and then insert them by
using a helper column with the following formula:

=LEFT(A1,4)&" "&MID(A1,5,4)&" "&MID(A1,9,4)&" "&RIGHT(A1,4)

Copy that down and then select all the numbers and use:

Copy
Edit > Paste Special > Values > OK

You can now remove the non-spaced version

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Carol K said:
We need some help with something I think could probably easily be solved ...

We use a worksheet which includes a cell for a credit card number.
The cell is formatted to make the number appear like this 0000 0000
0000 0000. However when we enter a credit card number in the cell it
changes the last number to a zero. For example, I enter 1111 2222
3333 4444, but when I press tab it changes to 1111 2222 3333 4440.
How can I make it stop doing that!? I can change it to text, but then
I loose the separation between the sets of numbers.
 

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