+ Reply to Thread
Results 1 to 10 of 10

unable to set a number range in a sequence macro

  1. #1
    Forum Contributor
    Join Date
    04-22-2015
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    171

    Smile unable to set a number range in a sequence macro

    Hi all
    I trying to create a macro that will ask me what cell to start a number range and the quantity, the attached sample works fro this but i need it to ask the range i.e. from / to (525 : 550). Sorry I can't seem to add an attachment so have added the macro below, it asks the start cell and how many but not skilled enough to set it to ask a starting number.
    Any help appreciated

    Please Login or Register  to view this content.

    Thanks
    James
    Attached Files Attached Files
    Last edited by JNEWMAN; 03-31-2019 at 08:30 AM.

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

    Re: unable to set a number range in a sequence macro

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

  3. #3
    Forum Contributor
    Join Date
    04-22-2015
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    171

    Re: unable to set a number range in a sequence macro

    Thanks for that Alan, hope I have followed your steps correctly. Please let me know if I have missed anything.

    Thanks again
    James

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,426

    Re: unable to set a number range in a sequence macro

    Moved to VBA section.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    04-22-2015
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    171

    Re: unable to set a number range in a sequence macro

    Cheers Ali

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: unable to set a number range in a sequence macro

    Try this to get you going:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Forum Contributor
    Join Date
    04-22-2015
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    171

    Re: unable to set a number range in a sequence macro

    Your a star TMS, works perfectly..
    Can I pick your skills for one final question on it? I would like the vale to load 10 column's across and the rest of the value in rows i.e. if it was 1 to 50, then it would load columns A1:J1, Rows 1 to 5. Hope this makes sense, I really appreciate the fix you gave me regardless.

    Many thanks
    James

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: unable to set a number range in a sequence macro

    That seems like quite a different question. Do you still need to request a cell start point? Is it always going to be 10 columns wide? It might be simpler just to drop the values straight into the worksheet. All depends on what you're trying to do, and why.

    Strictly speaking this thread is resolved and you should mark it solved. Start a new thread with the new question and provide a link back to this thread. That way, you'll get more input.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  9. #9
    Forum Contributor
    Join Date
    04-22-2015
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    171

    Re: unable to set a number range in a sequence macro

    Your correct, is a different question and I will close this one as solved and raise a new one. Again many thanks fro your help

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: unable to set a number range in a sequence macro

    You're welcome. Thanks for the rep.

+ 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. Replies: 7
    Last Post: 06-08-2015, 08:39 AM
  2. [SOLVED] Macro to Find the next number in sequence from a table.
    By brent_milne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2015, 10:40 AM
  3. Unable to drag numbers in sequence
    By preethy77 in forum Excel General
    Replies: 10
    Last Post: 12-15-2014, 06:56 AM
  4. Next Number in sequence generator - no macro
    By EdCid in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-17-2014, 11:09 AM
  5. Macro to add the current date plus a number sequence
    By mackdiesel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2012, 06:18 AM
  6. Macro sequence number
    By onenessboy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2012, 02:46 PM
  7. Macro for a unique sequence number
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2005, 08:45 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