Closed Thread
Results 1 to 2 of 2

getting sub or function not defined error

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    7

    getting sub or function not defined error

    i have done a programme that generates credit card numbers according to the follow conditions for a class assignment that is due tomorrow

    The account number is a 12-digit number, for example 660530 10 4067. It is generated as follows:
    1. First 6 digits: date of birth of agent (in YYMMDD)
    2. 7th, 8th digits: office code (see table 1)
    3. 9th – 11th digits: randomly generated digits (each digit is between 0 and 9 and generated with equal probability)
    4. The last digit is determined so that the account number satisfies the criterion of the Luhn Test
    Luhn Test
    1. Take the 1st, 3rd, … and every other odd digits from the right of the account number. Get the sum of these digits and call it s1.
    Example: the 1st, 3rd, … digits from the right of the account number 660530 10 4067 are 7, 0, 0, 0, 5, and 6. Thus s1 = 7+0+0+0+5+6 = 18
    2. Take the 2nd, 4th, …. and every other even digits from the right of the account number. Multiply each digit by 2. If the product is larger than 9, replace it by adding the two digits, thus forming a sequence of single digits.
    Example: the 2nd, 4th, …. digits from the right of the account above are: 6, 4, 1, 3, 0, 6.
    Multiplying each by 2 result in: 12, 8, 2, 6, 0, 12
    Replace any number in the sequence that is larger than 9 by the sum of the two digits (eg: 12 is replaced by 1+2,), we get: 3, 8, 2, 6, 0, 3.
    3. Get the sum of the digits in step 2 and call it s2.
    Example: s2 = 3+8+2+6+0+3 = 22
    4. s1 + s2 must be a multiple of 10

    But i am getting "sub or function not defined"error...i dnt knw where i gone wrong,please help...thanking you in advance.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: getting sub or function not defined error

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  2. Replies: 2
    Last Post: 09-12-2012, 01:01 PM
  3. [SOLVED] Run Time 1004 - App Defined or Object defined error with String defined path structure
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2012, 09:38 PM
  4. [SOLVED] Macro error - Run time error 1004 (App defined/Object Defined error)
    By jlax34 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-06-2012, 03:02 PM
  5. Application Defined or Object Defined Error, Command Button and Vlookup Function
    By stevedomer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2011, 11:20 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1