+ Reply to Thread
Results 1 to 4 of 4

Find_Cells_In_Column, Subscript out of range Error

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010
    Posts
    9

    Find_Cells_In_Column, Subscript out of range Error

    I am getting a "Subscript out of range" Error and cannot identify the correct solution. What am I missing? Please help.

    Thank you

    OX

    Please Login or Register  to view this content.
    Last edited by oxv; 08-23-2012 at 02:34 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Find_Cells_In_Column, Subscript out of range Error

    Hello oxv,

    Welcome to the Forum!

    A range object will always return a 2-D array of values even if the range is only a single row or column. You have to have 2 subscripts to access any element in the variant array "MyArr".

    If you want to walk through the rows of "Parts Array" and it is a single column then you would use MyArr(i, 1), where 1 is the left most column of range. If it is a single row then you would use MyArr(1, i) where 1 is the top most most row of the range.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Find_Cells_In_Column, Subscript out of range Error

    Yes, yes - so simple. I forgot about that.

    Your right, rushing causes delays.

    Thank you.

    OX

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Find_Cells_In_Column, Subscript out of range Error

    Hello OX,

    The devil is in the details. Glad I could help.

+ 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