+ Reply to Thread
Results 1 to 5 of 5

If one cell in range is not empty, the all range must be not empty

  1. #1
    Registered User
    Join Date
    07-27-2013
    Location
    Peru
    MS-Off Ver
    Excel 2003
    Posts
    24

    If one cell in range is not empty, the all range must be not empty

    Hello
    Im trying to run this code Ir: If one (or any) cell in the range A6:G6 and the cell O6 are not empty, then all range cells must be not empty.
    If not, cancel save and show msg box.

    This is the code iīm using inside a Sub SaveInvWithNewName()

    Please Login or Register  to view this content.
    ---------------------------
    The problem is than when I try to run this macro, if all the cells are blank, it "lock" the macro and it doesnīt run.
    I want this code to run if all the cells are blank or all the cells are not blank, but cancel if one (or more) cell is blank and other arenīt.

    Any solution?

    Regards
    Claudio.
    Last edited by Leith Ross; 08-01-2013 at 12:16 AM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: If one cell in range is not empty, the all range must be not empty

    attach please a sample file
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    07-27-2013
    Location
    Peru
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: If one cell in range is not empty, the all range must be not empty

    Here it goes the attachment.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: If one cell in range is not empty, the all range must be not empty

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-27-2013
    Location
    Peru
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: If one cell in range is not empty, the all range must be not empty

    Thanks patel45, it works perfect, you are a genius.

+ 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. If one cell in range is not empty, the all range must be not empty.
    By loroverde in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-29-2013, 03:43 PM
  2. If the range A1:F1 and the cell H1 are not empty, then all range cells must be not em
    By loroverde in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2013, 04:13 AM
  3. MACRO to empty a range of cells based on whether specified cell is empty
    By TBJV in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 10:35 PM
  4. Finding next empty empty cell in a range of columns
    By UncleBun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2006, 07:25 PM
  5. Next empty cell in range
    By Fraggs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2005, 09:07 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