+ Reply to Thread
Results 1 to 5 of 5

IsEmpty for multiple cells

  1. #1
    Registered User
    Join Date
    11-09-2016
    Location
    UK
    MS-Off Ver
    365
    Posts
    85

    IsEmpty for multiple cells

    Hi,

    I'm creating a form which users will complete and email. I need certain mandatory fields to be completed.

    I have code which checks if a cell is empty, if it is it prompts a message box and turns the corresponding question cell red. if it is not blank, it will create a pdf and send an email.

    This is working however I have several mandatory cells and I'm not sure the best way to write the code to test all mandatory cells before moving on to send the email. if any of them is blank I want to flag the message box and turn any/all blank questions red.

    Here is what I have so far:
    Please Login or Register  to view this content.

    Many thanks in advance!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: IsEmpty for multiple cells

    You can do something like this:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    11-09-2016
    Location
    UK
    MS-Off Ver
    365
    Posts
    85

    Re: IsEmpty for multiple cells

    Brilliant! second time you've sorted me out today Rory!

    Only thing is, its not the empty cell I want to turn red but the adjacent cell. eg. if B3 is blank, make A3 red?

    Thanks again!

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: IsEmpty for multiple cells

    Then refer to cell.offset(, -1)

  5. #5
    Registered User
    Join Date
    11-09-2016
    Location
    UK
    MS-Off Ver
    365
    Posts
    85

    Re: IsEmpty for multiple cells

    Rorya you're a legend, thank you so much!

+ 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. [SOLVED] Do While IsEmpty Help
    By DavidWally in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2019, 10:41 PM
  2. Replies: 1
    Last Post: 10-30-2018, 05:01 AM
  3. Copy all cells in range if not isempty
    By rynofrowan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2013, 06:15 AM
  4. Not isempty()
    By nikko50 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2013, 01:19 PM
  5. Isempty with cells
    By katto01 in forum Excel General
    Replies: 2
    Last Post: 02-08-2012, 03:03 AM
  6. IsEmpty
    By Determined in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2007, 07:44 PM
  7. IsEmpty() Returns False in empty cells
    By John Hutchins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2005, 10:07 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