+ Reply to Thread
Results 1 to 5 of 5

If Special Cells count is zero

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    If Special Cells count is zero

    Should be simple, but for me not so much. Here's what I'm trying to do: IF there are any formula cells in my selection shut it down, otherwise do my stuff. My problem is when there are no formula cells, excel throws up an error saying no cells are found. Any help is appreciated.
    Please Login or Register  to view this content.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: If Special Cells count is zero

    Hi, jomili,

    one way around raising the run-time error is to do it like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: If Special Cells count is zero

    Hi jomili,

    You need to 'trap' the Runtime error, so you can continue processing with syntax like the following:
    Please Login or Register  to view this content.
    Lewis

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: If Special Cells count is zero

    Thanks Holger, that seems to work well. I appreciate the help.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: If Special Cells count is zero

    Sorry Lewis, guess I was posting the same time you were. Thanks for the help.

+ 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. Special count issue
    By JO505 in forum Excel General
    Replies: 0
    Last Post: 03-06-2015, 04:09 PM
  2. Count Special Situation
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-12-2014, 12:45 PM
  3. Count - Special case
    By shiyaschennattu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 12:46 PM
  4. Edit for special filter and count...
    By superspurs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2009, 10:13 AM
  5. How do you count (not sum) cells containing special formatting?
    By tbank in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2005, 06:05 PM
  6. How do I count If for these special distinctions
    By Desperate Novice in forum Excel General
    Replies: 2
    Last Post: 01-24-2005, 06:06 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