+ Reply to Thread
Results 1 to 5 of 5

Help to code not work on Sheet with many rows and columns.

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Help to code not work on Sheet with many rows and columns.

    Hi I have below code. It was working on a test sheet but when i now try it on a very big file it give me an error.
    The code sort the rows in a chosen column. And add sheets with that name. So if in column Austria is there, it will create a sheet called Austria and put all rows with Austria in there. The File i am working with have 100 columns and 115806 rows. It give me this error message in the red field.

    ActiveSheet.Name = x

    The name is all ready taken try a new one.


    Please have a look i cant off course attach a so big file. But would be happy if some know and can help with that.

    Thanks in advance

    Sincerely

    Abjac

    Please Login or Register  to view this content.

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Help to code not work on Sheet with many rows and columns.

    Is it possible, you have repeated a value in the column you are looking over? Wouldn't that produce an attempt to name a sheet the same an one you added previously?

    I'd get around that with error handling - below is a much simpler example. If the name is already used, you'll need to name it something else.

    Example, you could add a (#) after the name like Excel would do if you copied the sheet.


    Please Login or Register  to view this content.
    Last edited by GeneralDisarray; 07-14-2015 at 09:59 AM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Help to code not work on Sheet with many rows and columns.

    HI Generaldisarray. I think your right. I have not been thinking on that. I tried to move Denmark in testsheet before. And now it made the same error.

    So the code are not really perfect. They can come in different order. UPS. But i think this is the error.

    I have attached a testsheet and this time put them in various order. Please i really need a code which can do that. Dont know if the existing can.

    But please have a look thanks

    Sincerely

    Abjac
    Attached Files Attached Files

  4. #4
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Help to code not work on Sheet with many rows and columns.

    Sorry, I'm not sure what you are trying to do. Are you trying to do exactly. What do you want to do with the table you just uploaded (in words please).

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Help to code not work on Sheet with many rows and columns.

    Hi abjac,
    try this
    Please Login or Register  to view this content.

+ 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. Help to code not work on Sheet with many rows and columns.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2015, 09:51 AM
  2. Replies: 1
    Last Post: 05-30-2015, 03:12 PM
  3. VBA code to copy rows to another sheet and sumup its columns
    By patua in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-24-2014, 11:59 AM
  4. [SOLVED] How to make the macro work for all rows in the work sheet
    By Valli nayaki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2013, 10:43 PM
  5. Copy rows from work sheets to combine to one work sheet based on cell value
    By joemcmillen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 05:04 PM
  6. Replies: 4
    Last Post: 04-26-2007, 02:13 AM
  7. Replies: 2
    Last Post: 07-11-2006, 11:15 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