+ Reply to Thread
Results 1 to 3 of 3

specialcells issues

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    46

    specialcells issues

    I seem to be having trouble with this line of code. Using the specialcells method deletes all the rows in the spreadsheet. This works most of the time but every now and again for large spreadsheets it doesn't work. I was wondering if any of you might have any suggestions?


    Please Login or Register  to view this content.
    Last edited by bobaftt; 07-07-2010 at 12:32 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: specialcells issues

    If SpecialCells finds a range with more than 8192 areas (non-contiguous subranges), it kindly returns the entire range, which is bad behavior.

    So you need to write a loop that deletes in 16,000-row groups, bottom to top.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-06-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: specialcells issues

    Thanks! That explains why it only happens on larger files. Do you happen to have any examples where you have used specialcells on 16000 line chunks of a spreadsheet?

+ 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