+ Reply to Thread
Results 1 to 20 of 20

error 1004 using the cells

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    error 1004 using the cells

    Please Login or Register  to view this content.

    whats wrong with this code??
    Last edited by RoOmIE; 10-08-2013 at 02:59 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    It looks OK to me, apart from the range you are filling from is the same as the same as the range you are filling to.

    Is there any other code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    i want to fill the columns underneath the vlookup

    here is an exaple for 4 columns

    Please Login or Register  to view this content.
    but i want to code it for a generic amount of columns and a generic amonut of rows

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    Where are you putting the initial formulas, ie the ones you want to copy down?
    Last edited by Norie; 10-08-2013 at 11:31 AM.

  6. #6
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    which formula? the vlookup?

    i am putting the code in a module if that helps ..

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    No, where are you trying to put the formulas on the sheet?

    The problem with the code is caused by the range you are copying from is the same as the range you are copying to.

    Copy the ranges with the formulas inserted by the loop, not sure what that is but I think it's starts in Cells(6, 10) (or Range("F6")).

  8. #8
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    i want to auto fill J6 to exaple M6 all the way down with the auto fill function

    yet i believe that i have found a mistake in the code ...

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    they start at cells j6 and go to cells dependeing on how many loops or sheets go on to lets say M6 for 4 iterations ... then i want to fill the rest of the table going downwards

  10. #10
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    norie i am sorry but i don't really understand what you mean ..

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    That looks right, apart from the unneeded Selects.
    Please Login or Register  to view this content.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    What don't you understand?

  13. #13
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    i replaced it with the code that you put on here and i still get the same 1004 error

  14. #14
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    and it has m6 as the active cell right before the error

  15. #15
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    As for what I'm tryng to say, here's an example.

    If you have a formula/value in A1 and you want to autofill down to A10 you would use this,
    Please Login or Register  to view this content.
    you wouldn't use this.
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    Please Login or Register  to view this content.
    the sample file is too big its 2 Megs i can`t upload it unless i use another site and i don't have access to my dropbox right now

  17. #17
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    roomie 02-10-2013.xlsx

    please use the above code with the sample file .. thanks again norie

  18. #18
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    got it .. thanks !!! it works..

  19. #19
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: error 1004 using the cells

    What fixed it?

  20. #20
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: error 1004 using the cells

    Please Login or Register  to view this content.
    i had to reset the the last column and the lastrow value ...

+ 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 1004 - Cells method failed
    By Marceltcm in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-31-2013, 01:06 PM
  2. Color cells RGB colors, error 1004
    By smile0 in forum Excel General
    Replies: 6
    Last Post: 05-24-2012, 04:42 PM
  3. cells.select returns error 1004
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2010, 04:21 AM
  4. range(cells(),cells()) from 2 different workbooks, run time error 1004
    By sam0287 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2010, 05:46 AM
  5. Worksheet.Range(Cells(r,c),Cells(r,c)) & error 1004
    By onebir in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-28-2007, 05:10 AM

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