James asks in Custom Cell Formatting in Excel Post,
I have a problem when formatting a cell that has 16 or more digits … We are working with Credit Card numbers and want to be able to enter them as a 16 digit number like this: 1234123412341234 but want them to look like this: 1234 1234 1234 1234
The problem we’re having is that the last digit always turns into a 0 (zero) and the number ends up looking like this: 1234 1234 1234 1230 The custom format type we created is: 0000 0000 0000 0000 but we’ve also tried: #### #### #### #### with the same results.
This only happens when using 16 or more digits. If we use 15 or less digits, the Custom format works fine. Unfortunately, credit cards have 16 digits so we’re stuck with the problem.
We’ve tried this on Excel 2007 with service pack 1 and on Excel 2000 with service pack 3 with the same results. The Operating Systems we’ve tried it on are Windows XP with Service Pack 3 (and all other Microsoft Updates installed) and on Windows 2000 with Service Pack 4.
Well, this is because Excel stores numbers with precision of 15 digits. So anything more and it is automatically converted in to engineering format.
Here is a simple workaround if you need to store and work with credit card numbers in excel:
Change the cell format to TEXT from general or number. Thus excel treats numbers as text and you can escape the truncation.
But what if you need to format the credit card numbers in a special way? well, we use a knife and cut the number in to 4 small parts. Not really, we use the LEFT, MID and RIGHT formulas to process the credit card number and format it the way we want.
For eg. if you want to format the credit card number 1234123412341234 like 1234 1234 1234 1234, you can use the formula
=LEFT(B3,4)&" "&MID(B3,5,4)&" "&MID(B3,9,4)&" "&RIGHT(B3,4)
and if you want to test the credit card, you know where to go. To our Excel formula E-book page.
I have a problem when formatting a cell that has 16 or more digits … We are working with Credit Card numbers and want to be able to enter them as a 16 digit number like this: 1234123412341234 but want them to look like this: 1234 1234 1234 1234












3 Responses to “How-to create an elegant, fun & useful Excel Tracker – Step by Step Tutorial”
Hi Chandoo,
I am responsible for tracking when church reports are submitted on time or not and the variations from the due date for submission.
Here is the Scenario;
The due date for the submission of monthly reports is on the 5th of each month. and I would like to know how many reports have been submitted on time (i.e, those that have been submitted on or before the due date) I would also want to track those reports that have been submitted after the due date has passed.
How can I create such a tracker?
Hi Chandoo,
I am a member of your excel school.
I was trying to create SOP Tracker I follow all your steps but I keep this error below.
The list source must be a delimited list, or a reference to a single row or cell.
I try looking on YouTube for answer but no luck.
can you help on this?
thanks
Carl.
Dear Mr. Chando,
Rakesh, I'm working in a private company in the UAE. Recently, I'm struggling to get more details about the staff sick, annual, unpaid, and leaves. I would like to get a tracker in excel. Could you please help me in this situation?
I also watching your videos in YouTube. i hope you can help me on this situation.