+ Reply to Thread
Results 1 to 11 of 11

Increment cell value beginning from user prompted input

  1. #1
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Increment cell value beginning from user prompted input

    I need to prompt a user to input a number (ex. 2228383) and then loop through each cell in column I, incrementing each cell in column I by 1, until reaching the max number of rows in column A (ex, Column A has 60 rows).

    Using the example input above,

    I2 = 2228383
    I3 = 2228384
    I4 = 2228385
    I5 = 2228386
    ...
    ...
    ...
    I60 = 2228443

    Any help would be appreciated.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: Increment cell value beginning from user prompted input

    Try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Increment cell value beginning from user prompted input

    Not knowing all the details, this was my best guess:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Re: Increment cell value beginning from user prompted input

    Jindon,

    I was able make your code work with the exception that is is continuing 1 row past the max # of rows in column A. Now I want to skip the incrementing and setting of the cell values for all rows where the Stop Type = PICK (Column D).

    Stop Type Seal #
    Pick
    Drop 2238384
    Pick
    Drop 2238385
    Pick
    Drop 2238386
    Pick
    Drop 2238387
    Pick
    Pick and Drop 2238388
    Pick and Drop 2238389
    Pick and Drop 2238390
    Drop 2238391
    Pick
    Pick and Drop 2238392
    Pick and Drop 2238393
    Drop 2238394

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Increment cell value beginning from user prompted input

    What about Pick and Drop? does that still increment? Maybe you could provide a sample workbook to work with? This new request makes it very different from the original question.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: Increment cell value beginning from user prompted input

    Then maybe something like this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Re: Increment cell value beginning from user prompted input

    Thank you Jindon. This worked perfectly. I'd like to add one more little tweak, and I want to upload a sample spreadsheet to make it clearer, but I can't figure out how to upload a sample Excel doc.
    Last edited by ssmith001; 03-23-2018 at 10:52 AM.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: Increment cell value beginning from user prompted input

    You are welcome.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  9. #9
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Re: Increment cell value beginning from user prompted input

    OK, I figured out how to upload a sample. For column B, I need to merge those cells when Load ID breaks to a new value, and also auto-increment the Door # column, starting at a user prompted input value.
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,597

    Re: Increment cell value beginning from user prompted input

    Try
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-02-2007
    Posts
    23

    Re: Increment cell value beginning from user prompted input

    Perfect! Just curious, when I run the code the input box is not centered. From what I've read online, the position is not specified, it should be defaulting to center screen

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to insure a user is prompted to input a date as format MM/DD/YYYY
    By gshowman1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2018, 10:58 PM
  2. [SOLVED] User prompted sheet name stored with quotations. I need them gone to be inputted into sub
    By grazian2 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-05-2013, 11:42 AM
  3. [SOLVED] input date column A, increment B, select blank cell in D and input time. in a macro
    By jeffstu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 11:19 AM
  4. VBA to prompted user for employee number.
    By Absent in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-27-2012, 05:53 PM
  5. How to be prompted to input filename when saving in an Excel macro
    By edsonk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2008, 12:27 PM
  6. Increment cell value depending on input elsewhere
    By Waidesworld in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2007, 11:26 AM
  7. [SOLVED] not being prompted that user has file open
    By maryj in forum Excel General
    Replies: 0
    Last Post: 12-15-2005, 11:15 AM

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