+ Reply to Thread
Results 1 to 5 of 5

MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

  1. #1
    Registered User
    Join Date
    04-08-2010
    Location
    toronto,ontario
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

    i am trying to loop through a column of one worksheet, and look to see if the values have already been incuded in the columns of another worksheet. Basically i need to include any values that may have been missed, and ignore values that have been repeated.

    What i have tried to do is 'for' through the first list and check how many times a specific word comes up with reference to another list.

    if it doesnt show up i am trying to make it write its name in the next empty box.

    Analyzer class A
    Analyzer class A
    Analyzer class d
    ALARM class A
    Then in myy spreadsheet
    Im going to have

    A B C D
    Analyzer 2 0 0 1
    Alarm 0 0 0 1

    That is basically what i want to end up with

    Here is my code i get a 1004 error when i am trying to define the specific cell Ranges, it says that the range is hidden. I have identified where the error occurs can somebody please help me out
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 04-08-2010 at 01:17 PM. Reason: Added Code Tags

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

    Hi,
    first could you edit your post by putting code tags round the code [code ] at the beginning and [/code ] at the end (but without the spaces).

    From the way you have described your requirement I think this could be done just with worksheet functions. Could you attach a sample spreadsheet it is easier to see what is going on.


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    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: MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

    Hello ssbhardw,

    Welcome to the Forum!

    There are some rules you need to be aware of when you post.
    1. Your thread title should clearly describe your problem or question.
    2. To make the code easier to read and copy, format it with Code Tags.

    Because you are new, I have wrapped the code for you.

    As a new member, please take some time to familiarize yourself with the rules.
    Forum Rules
    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!)

  4. #4
    Registered User
    Join Date
    04-08-2010
    Location
    toronto,ontario
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

    Sorry about that. I have attached a quick sample of what i basically need to get done, the macro is included, but if you think it can be done with simple functions please let me know Thank you.
    Attached Files Attached Files

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: MACRO, ERROR 1004, Method 'Range' of object '_Global' failed

    Hi ssbhardw

    I believe Mr Ross also asked you to change your thread title. If you'll do that, I've got some suggestions for your issue.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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