Results 1 to 4 of 4

Testing for Empty Cells

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Testing for Empty Cells

    This has likely been asked before, and I'm trying to learn and get this right, but struggling with. In my various spreadsheets I have if statements that often show a "Blank" with something like this"

    =IF(F7=0,"","Not Blank")

    Now I'm trying to create a customfunction that will search a range, and then tell me either Yes or No if all of the cells are truly blank, no formula's, etc.

    I think this is close, yet it keeps returning a 0 for an answer?

    Function IsEmpty(List As Range) As Double
        Dim Cell As Variant
        
        For Each Cell In List
            If Not Cell Is Nothing Then
                ActiveCell.Value = "Yes"
                Exit Function
            Else
                ActiveCell.Value = "No"
            End If
        Next Cell
    End Function
    Last edited by ptmuldoon; 09-30-2014 at 10:20 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-26-2014, 01:31 PM
  2. Having problem with testing if array is empty .......see enclosed code
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2011, 11:09 AM
  3. Testing for Blank Cells
    By CaptinKrunch in forum Excel General
    Replies: 30
    Last Post: 10-06-2009, 02:54 PM
  4. Testing Values of Cells
    By none.ya@bidness.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2005, 04:05 PM
  5. macro to colour empty cells (cells not recognized as empty)
    By Gerben in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2005, 11:05 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