+ Reply to Thread
Results 1 to 4 of 4

Testing for Empty Cells

  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?

    Please Login or Register  to view this content.
    Last edited by ptmuldoon; 09-30-2014 at 10:20 PM.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Testing for Empty Cells

    Please Login or Register  to view this content.
    didnt use isempty to avoid confusion with vba formula
    Last edited by humdingaling; 10-01-2014 at 12:22 AM. Reason: cut code some more
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

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

    Re: Testing for Empty Cells

    Thanks,

    I think the key piece I was missing and forgot is that when creating a custom function, you need to return the custom function name as the result. Is that correct?

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Testing for Empty Cells

    that is generally the case...i dont really have much experience in custom functions to be honest

    my code works on premise
    if any cells is not empty...its automatic no and exit
    if code goes all the way thru the for loop meaning every cell passes empty check...then empty is yes
    not quite sure what your if is doing

    also don't declare double when you want a string output
    you get a #value error

+ 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. 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 [email protected] 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