+ Reply to Thread
Results 1 to 4 of 4

Run-time error '9': Subscript out of range

  1. #1
    Registered User
    Join Date
    06-14-2021
    Location
    America
    MS-Off Ver
    Microsoft Excel for Office 365 MSO
    Posts
    32

    Run-time error '9': Subscript out of range

    Hi Excel Experts,

    Does anyone know why I'm getting this error after I run my macro?

    I recorded a Marco to clean up a .csv file into a workable format. I am able to run the Marco on other spreadsheets with no problem but get an error message (as shown in attached picture). I've included the section of the Macro that sorts both columns B & A; which the error is originating from.
    Attached Images Attached Images

  2. #2
    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,464

    Re: Run-time error '9': Subscript out of range

    Check the spelling of the worksheet name and make sure the worksheet is present in the active workbook.
    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


  3. #3
    Registered User
    Join Date
    06-14-2021
    Location
    America
    MS-Off Ver
    Microsoft Excel for Office 365 MSO
    Posts
    32

    Re: Run-time error '9': Subscript out of range

    Oh ok, it was the date at the end of the worksheet name "2021-05". I just need to remove the date before I run the Macro which solved the problem.

    Thanks for you response.

  4. #4
    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,464

    Re: Run-time error '9': Subscript out of range

    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. Error code "run time error 9: subscript out of range
    By iBennett93 in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 06-28-2021, 05:03 AM
  2. [SOLVED] Run Time Error 9 - Subscript out of range
    By kersplash in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2018, 02:05 AM
  3. [SOLVED] Run-time error '9': Subscript out of range
    By chergian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2014, 02:40 AM
  4. [SOLVED] Run-time error '9': subscript out of range - error occurs on multiple computers except one
    By BrettE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2014, 11:19 PM
  5. [SOLVED] Run time error 9 subscript out of range
    By cgabe001 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-05-2012, 01:10 PM
  6. [SOLVED] Run-time error 9 - subscript out of range
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2012, 09:46 PM
  7. Run time error 9 : Subscript out of range
    By JAtz_DA_WAY in forum Excel General
    Replies: 6
    Last Post: 08-29-2005, 03:26 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