Specialised validation

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Hi...

I'm trying to capture 16 numbers in a cell for a credit
card number data entry. What code will set the validation
to alert the use that less or more than 16 digits have
been entered...

Thanks in advance

Gordon.
 
Format your cells as text first (or have the user type a leading apostrophe).
Excel only works with 15 significant digits.

Then Data|Validation
Allow: Text length
Data: Equal to
Length: 16
 
Hi Gordon,

In addition to Dave's advice, there is more you can do to ensure a valid
credit card # just by looking at the digits. For more info, you can look
here:

http://www.beachnet.com/~hstiles/cardtype.html

There's even a link to download an Excel file that will show you how to do
it.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
And I guess not all credit card numbers are 16 digits long:

http://www.merriampark.com/anatomycc.htm



Jake said:
Hi Gordon,

In addition to Dave's advice, there is more you can do to ensure a valid
credit card # just by looking at the digits. For more info, you can look
here:

http://www.beachnet.com/~hstiles/cardtype.html

There's even a link to download an Excel file that will show you how to do
it.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
Hi...

I'm trying to capture 16 numbers in a cell for a credit
card number data entry. What code will set the validation
to alert the use that less or more than 16 digits have
been entered...

Thanks in advance

Gordon.
 
Back
Top