+ Reply to Thread
Results 1 to 4 of 4

If cell is blank then - help required

  1. #1
    Forum Contributor
    Join Date
    06-24-2009
    Location
    SCOTLAND
    MS-Off Ver
    Excel Version 2108
    Posts
    144

    If cell is blank then - help required

    There are two possibile solutions to my problem. I wish to run a macro only if a particular cell is blank.

    Another method which could be more robust may be to only run the macro if a particular cell matches the text from a predefined list.

    Any one of the two options would be great. Can anyone help me achieve this?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: If cell is blank then - help required

    Hello heliskier89,

    How is the macro run?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: If cell is blank then - help required

    Hi.

    It would be interesting to say you want more details.

    Post an example.



    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: If cell is blank then - help required

    For the former, you would just need to check the contents of this cell at the start of your routine eg:

    Please Login or Register  to view this content.
    The above will exit the sub if the cell isn't empty.

    For the second option there are a variety of ways to check this, but where is the pre-defined list stored? In a worksheet range, defined name or code array?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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