+ Reply to Thread
Results 1 to 12 of 12

Trying to extract lines with "order" in column F from a few worksheets to an order sheet

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    4

    Trying to extract lines with "order" in column F from a few worksheets to an order sheet

    As mentioned in the title I am trying to extract lines from multiple worksheets with the word Order in column F. I have managed to do this except when there are more than 37 orders on one sheet it will come up with the error:
    "Run-time error '1004':
    Method 'Range of object'_Global failed"

    I have attached the excel file so that so can look through the code, and hopefully see where I am going wrong.

    New Sheet.xlsm

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: "Run-time error '1004': Method 'Range of object'_Global failed"

    You stand a better chance of getting help if you upload the "problem" file.

    Alf

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: "Run-time error '1004': Method 'Range of object'_Global failed"

    or at least post the code ;-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: "Run-time error '1004': Method 'Range of object'_Global failed"

    Cheers Alf

    New Sheet.xlsm

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: "Run-time error '1004': Method 'Range of object'_Global failed"

    Please Login or Register  to view this content.
    the address you were passing to the Range property was too long

  6. #6
    Registered User
    Join Date
    04-16-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: "Run-time error '1004': Method 'Range of object'_Global failed"

    Cheers JP

    Though that might be the case. Couldn't think to how to rewrite it. Anyway you are a genius. Cheers mate

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    Try this code
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

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

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-16-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    Arlu couldnt get yours to work, and jindon your code seem to copy the results four times. Anyway managed to get it working thanks to JP with his code. Thanks for both trying though, much appreciated. Here it is if you were interested:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 04-16-2013 at 01:36 PM.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    When you say mine didnt work, was it giving you an error on any row of code?

    Also, its against the forum rules to duplicate threads. This time i will merge the threads for you. If our codes were not working, its better if you mention it that its not and provide the line to us which is giving you the error. By duplicating threads, you are duplicating efforts, which could have been used on some other thread.

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

    Re: Trying to extract lines with "order" in column F from a few worksheets to an order she

    Quote Originally Posted by Megabruce View Post
    jindon your code seem to copy the results four times
    Is shouldn't.

+ 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