+ Reply to Thread
Results 1 to 6 of 6

IF statement to return a blank

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    IF statement to return a blank

    I have this IF statement in cell M6 in Tab 1: =IF(OR($A6="",$B6=""),"",INDEX(INDIRECT("'"&$B6&"'!k:k"),$A6))

    What this does is that the cell populates according to other cells and corresponding cells in Tabs 2-15 columns A-M.

    When cells in Tabs 2-15 are blank, cell M6 in Tab 1 returns a value of 0-Jan-00. How can I change that so that it returns a blank cell if a date has not been entered yet?

    Any help is appreciated. Thank you.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,821

    Re: IF statement to return a blank

    Are all the cells expected to return dates, or are some of them returning text and/or other numbers?

    Pete

  3. #3
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: IF statement to return a blank

    Quote Originally Posted by Pete_UK View Post
    Are all the cells expected to return dates, or are some of them returning text and/or other numbers?

    Pete
    All cells are expected to return dates. The cells are also formatted for dates.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,821

    Re: IF statement to return a blank

    Okay, in that case the simplest way would be to apply a custom format to the cells of:

    d-mmm-yy;;

    The two semicolons at the end (well, actually the final one) will cause a zero result to be displayed as a blank.

    Hope this helps.

    Pete

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: IF statement to return a blank

    Quote Originally Posted by Pete_UK View Post
    Okay, in that case the simplest way would be to apply a custom format to the cells of:

    d-mmm-yy;;

    The two semicolons at the end (well, actually the final one) will cause a zero result to be displayed as a blank.

    Hope this helps.

    Pete
    Worked like a charm! Thank you...you are awesome!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,821

    Re: IF statement to return a blank

    Glad to be able to help - thanks for the rep.

    Pete

+ 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(or statement to return blank cell
    By TomRet in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2015, 02:23 AM
  2. [SOLVED] If statement to return a blank cell
    By mrl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-18-2014, 08:03 PM
  3. If statement cannot return a real blank space
    By labogola in forum Excel General
    Replies: 4
    Last Post: 09-01-2011, 12:08 PM
  4. If statement to return blank instead of zero
    By goofball in forum Excel General
    Replies: 1
    Last Post: 03-12-2008, 08:25 PM
  5. Replies: 3
    Last Post: 11-22-2007, 07:53 AM
  6. If statement to return nothing if cell is blank
    By amusn in forum Excel General
    Replies: 5
    Last Post: 10-19-2007, 02:25 PM
  7. if statement - if A1 is blank then A2 to return zero
    By garyk007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2007, 10:37 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