+ Reply to Thread
Results 1 to 5 of 5

If cell a2 is blank if statement

  1. #1
    Registered User
    Join Date
    07-09-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    52

    If cell a2 is blank if statement

    Thanks for any help given. It is greatly appreciated.

    I have this code here that works properly. It's saving each sheet as a PDF however I need it to not save the sheet and just skip it if cell A2 is blank. I'm not sure how to code that. Here is my code so far:
    Please Login or Register  to view this content.
    Thanks for the help!
    Last edited by travis.cook21; 09-14-2016 at 10:11 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Re: If cell a2 is blank if statement

    You can edit your original post and add code tags to the code.

    AA CodeTags.jpg

  3. #3
    Registered User
    Join Date
    07-09-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    52

    Re: If cell a2 is blank if statement

    Quote Originally Posted by davesexcel View Post
    You can edit your original post and add code tags to the code.

    Attachment 480310
    Sorry didn't think that was necessary since it was so simple. It's essentially just selecting a new sheet in a workbook each time and then saving it as a pdf. I need it to not save it if cell A2 is blank (A2 will always be a formula but it may not return a value and will be blank).

    Thanks.

  4. #4
    Registered User
    Join Date
    07-09-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    52

    Re: If cell a2 is blank if statement

    Quote Originally Posted by alansidman View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Thanks. Do I have it correct now?

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: If cell a2 is blank if statement

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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 statement on blank cell
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 03-21-2015, 04:33 AM
  2. if(or statement to return blank cell
    By TomRet in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2015, 02:23 AM
  3. [SOLVED] if statement returns zero on a blank cell
    By mmccra2858 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-01-2015, 10:04 AM
  4. IF Statement to leave cell blank if multiple cells are all blank
    By sweeteri in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-14-2014, 12:02 PM
  5. [SOLVED] If statement that copies text from a separate worksheet, or if blank, leaves cell blank.
    By barleycorn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-22-2012, 12:30 PM
  6. keep cell blank if IF statement is False
    By ruthslaughter in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-25-2005, 09:35 AM
  7. [SOLVED] If statement referring to a blank cell
    By papa jonah in forum Excel General
    Replies: 2
    Last Post: 03-16-2005, 09:06 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