+ Reply to Thread
Results 1 to 15 of 15

Incremental numbering based upon user input

  1. #1
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94

    Incremental numbering based upon user input

    I have created a macro that processes through information for the creation of checks. I would like to have a way for the user to input a check number, and Excel to take that number, drop it into cell A2, then increment it and drop the next number in A3, and so on until all of the checks have been numbered. The process should stop at such a point as there is no more text
    in column B.

    Here is an example. Let's say I have 35 checks to write. The first check number is 200. I would want a user box to pop up which asks me for the first check number. I would enter 200. Then the process would place the number 200 in cell A2 (A1 is part of the header information for the checks.) In cell A3, the number 201 would be placed. The final check number would
    drop into cell A36. No check numbers would appear in cells A37 and greater because cell B37 is empty, signifying that there is no further check data.

    Can anyone help with this?

    Thanks so much,
    Mike
    Learn to Serve Others. Kindness is far better than the alternative.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Try

    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Perhaps this would work
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    Rylo,

    Thank you for the reply to my question. The only problem is that check numbers are created even when there is NOT a text value in column B. One interesteing note .. the check number do stop .. and at the right point. But right now the are some extra lines of check detail on the sheet that should not have check numbers by them.

    Here is what I WANT to happen.. (The number 2332 represents a check #) (I needed to use periods to move the text to look like there are in rows)

    2332 04 Joe Simpson 1232 Glendale Lane $2000
    ........................................................Regular pay $1000
    .............................................................Sick pay $1000


    Here is what IS happening

    2332 04 Joe Simpson 1232 Glendale Lane $2000
    2333..................................................Regular pay $1000
    2334.......................................................Sick pay $1000

    I hope this helps identify the problem,
    Mike
    Last edited by mjwillyone; 06-15-2008 at 11:53 PM.

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Can you attach a sample workbook showing your structure and explain what should happen for what scenarion.

    rylo

  6. #6
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    Rylo,

    I have attempted to attach the spreadsheet but it is larger than the allowed size in this forum. However, I have attached a simply .bmp file that shows the result of the two code posts to my question. You will notice that:

    1) the header is changed from checknbr to the first check number assigned
    2) where the incremented check number should only appear when a "04" (text) is found in cells in column B, there are check numbers throughout.

    I hope this helps clear the results up.

    Thanks,
    Mike
    Attached Images Attached Images

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Cut down the size of the file, and try zipping it to see if you can get under the size limit.

    Failing that, try putting the file on one of the free online storage sites, and provide the link and any required passwords etc.

    rylo

  8. #8
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    Rylo,

    You can download the file at this temporaty location:

    http://www.baptistworldmission.org/files.htm

    Thanks,
    Mike

  9. #9
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    So where in this file would you like to have the cheque numbers? A3,A6,A9,A10,A11.....

    Can you add another sheet to the file to show how it should look when completed.

    rylo

  10. #10
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    Rylo,

    I have uploaded a revised Excel file in the same location. I have added a second page that shows exactly where and how the check numbers should appear.

    Thanks,
    Mike

  11. #11
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Can see any second page on the file....


    rylo

  12. #12
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    There .. try it now. I uploaded the file, then downloaded it to make sure and, yes, it has two tabs (pages) in it now.

    Thanks,
    Mike

  13. #13
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Try

    Please Login or Register  to view this content.
    rylo

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525
    Based on your bmp file as I can not download any file.
    Please Login or Register  to view this content.
    Last edited by jindon; 06-16-2008 at 10:04 PM.

  15. #15
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94
    Rylo,

    WOW ... your code works GREAT! Thank you so much. I really appreciate it!

    Mike

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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