+ Reply to Thread
Results 1 to 5 of 5

Run-time error 1004 no cells were found

  1. #1
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Run-time error 1004 no cells were found

    Hi,

    I have a macro's running a button were if data in two columns match then it removes entire row. Problem is that if there is no data then it returns the 'run-time 1004 error no cells were found'. I've tried researching this and I'm assuming its to do with the .SpecialCells command but can't figure it out.

    Please Login or Register  to view this content.
    Anybody got any ideas?

    Thanks

  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,340

    Re: Run-time error 1004 no cells were found

    Try

    Please Login or Register  to view this content.
    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
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Run-time error 1004 no cells were found

    Use 'On Error Resume Next' to ignore errors
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Re: Run-time error 1004 no cells were found

    Perfect, thanks both.

    Not what I thought and didn't even know about On Error Resume so I've learned something new

    Thanks

  5. #5
    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,340

    Re: Run-time error 1004 no cells were found

    You're welcome.

+ 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. [SOLVED] run time error 1004 no cells were found
    By iwannabakat in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2014, 04:13 PM
  2. [SOLVED] Alternative message box instead of run time error 1004 box no cells were found
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-05-2013, 04:26 AM
  3. [SOLVED] Run Time Error Message 1004 : No Cells were found
    By brajpalshishodia in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-15-2012, 12:52 PM
  4. Run-time error '1004': No cells were found
    By tirk82 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2012, 12:48 PM
  5. Run-time error '1004':File not found
    By DomV in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2009, 10:26 AM
  6. Microsoft Visual Basic Run-time error '1004' No cells were found
    By Paul Riker in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-28-2005, 01:05 AM
  7. [SOLVED] Run-time error '1004': No cells were found
    By Jamie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2005, 06:06 PM

Tags for this Thread

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