Macro for placing numbers between two numbers in other sheet

  • In my workbook i have two sheets named data & Output.
    In Data sheet i have Column headings as Sl. No, RFI NO, From, To. I have values in rows.
    From data sheet Numbers between From & To Columns has to be placed in Output sheet as shown in attached file.
    I have to place these between numbers in an increment of 10 ( As "From" or "To" Columns values may not ends with zero)
    And i have to place "RFI No" value in each row of sheet "Output" for that From & To Values.


    Thanks in advance

  • Re: Macro for placing numbers between two numbers in other sheet


    i don't know how to create macros.


    As a lot of data is there, i need this macro to complete my work.


    Thanks for reply.

  • Re: Macro for placing numbers between two numbers in other sheet


    ashokkumarkolla,


    While you're welcome to the forum, cross-posting the same question in other forums without providing a link to your other posts is specifically banned by the rules here. You posted the same issue on ExcelForum (http://www.excelforum.com/exce…mbers-in-other-sheet.html)


    Your post has been locked until such time you review the rules (here), update your thread on ExcelForum to indicate the issue is also posted here and send me a private message (click my name at the top of this message and select 'Private message' from the menu) indicating you agree to the rules and will abide by them in future.


    Shosmeisters post with a possible solution will be restored when your post is opened again.

  • Re: Macro for placing numbers between two numbers in other sheet


    I had changed that. Now i am facing run time error 6 ( Over flow)


    The code is this:-



    Thanks

  • Re: Macro for placing numbers between two numbers in other sheet


    Don't forget to use the CODE tags in your posts!


    Where are you getting the error? Obviously the "real" data is significantly different than your sample so you may need to upload your file.

  • Re: Macro for placing numbers between two numbers in other sheet


    Ahhh. Change the variable type for both From_Val and To_Val from Integer to Long. That should fix the overflow problem.


    This is a good example of why you need to try to put data that is as close as possible to your real data when uploading sample files. Obviously, if there is proprietary data that needs to be changed, then do so but try to keep it similar.

  • Re: Macro for placing numbers between two numbers in other sheet


    Thanks a lot Mr. ShosMeister


    I had changed it as per your point.


    and it worked after modifieng RFI No column also.


    Thanks once again

  • Re: Macro for placing numbers between two numbers in other sheet


    Glad it's working for you and hope you take some time to see what it's doing and how so you can learn a bit more about VBA and Excel.

  • Re: Macro for placing numbers between two numbers in other sheet


    Mr. ShosMeister

    Once again thanks for your continued help.

    Now I had found a mistake in my Strip Charting procedure. To over come this mistake I had changed the format of Output as follows:

    Old Output Format:-

    From: RFI


    New Output Format:-

    From: To: RFI


    I don't know how to modify this macro. Please modify this macro.

    Thanks in advance

    Ashok Kumar Kolla

  • Re: Macro for placing numbers between two numbers in other sheet


    Been busy with work. Should be able to take a look at this shortly. Please provide a better explanation of what the problem is. Is the macro not working any longer? Is there an error?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!