Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Number formatting is driving me crazy...please help

  1. #1
    New Member
    Join Date
    May 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have an excel document that has a field for credit card number. I just merged two adjacent cells and formatted the cells to accept a number. The problems is whenever I type is 16 digits for a credit card, the 16th digit is replaced by a "0". If I type in 15 digits the number looks fine and there are no problems. But the 16th digit is always replaced by a "0". I checked the formatting and rounding properties but I cant see anything wrong. Please help. I have to get this form done today.

  2. #2
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,450
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Board Regular Barry Katcher's Avatar
    Join Date
    Feb 2002
    Location
    Dog Beach, Florida. Yeaahh!
    Posts
    4,053
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I tried 16 numbers and yup, I got the same zero at the end. Dunno why.

    Since I doubt that you are going to be doing any calculations (i.e. sums) based on these entries, why don't you just format the cells as "text"?

    Better yet, set up a custom format. Click on Format-Cells-Custom and in the window type in #### #### #### ####.

    You can then enter all 16 numbers and it will automatically display with a space between every four numbers, same as on the card. You can even get a sum this way, if you need a hash total.
    Barry-

    Photo Restoration/Enhancement

    http://www.smiledogproductions.com
    click below for detour


  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The largest integer that Excel will accept has 15 digits. You should format the cells containing your card numbers as Text before your enter their value. There's no need to format as numeric since you probably won't be doing arithmetic operations on card numbers.

    [ This Message was edited by: Mark W. on 2002-05-09 13:59 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •