+ Reply to Thread
Results 1 to 11 of 11

If condition with blank cells

  1. #1
    Registered User
    Join Date
    10-30-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    20

    If condition with blank cells

    How do I return a value if one cell contains a date value and the cell above it is blank?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: If condition with blank cells

    What is your criteria?
    What answer if criteria is True?
    What answer if criteria is False?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-30-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    20

    Re: If condition with blank cells

    I have a list of dates and next to the dates and I want an equation to only return the top date of the list. So it would be something like =IF(AND(A2=*a date*,A1=*blank cell*),A2,"")

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: If condition with blank cells

    Maybe this:

    =IF(AND(A2=DATE(2017,10,30),A1=""),A2,"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    10-30-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    20

    Re: If condition with blank cells

    Not looking for a specific date, just if it contains a date

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: If condition with blank cells

    A date as opposed to what? What other type of value could be in the cell?

  7. #7
    Registered User
    Join Date
    10-30-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    20

    Re: If condition with blank cells

    As opposed to a blank cell...

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If condition with blank cells

    welcome to the forum. the unfortunate part is that Excel recognizes date as integers & time as decimals. to verify, type in 1jan2013 in A1. and 12 pm in B1. Format both cells to General. you will see that A1 is 41275 (meaning 41,275th day from 1 Jan 1900) & B1 is 0.5 (1/2 a day).

    since you can't verify if it's a date, the best you can do is to check if A2 is a number.
    =IF(AND(ISNUMBER(A2),A1=""),A2,"")

    or if you are certain it's between a certain date (2010 to 2017 for eg), then:
    =IF(AND(A2>=--"1jan2010",A2<=--"31dec2017",A1=""),A2,"")

    or if you say it's as opposed to a blank cell (no other possibilities of numbers or text), then:
    =IF(AND(A2<>"",A1=""),A2,"")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  9. #9
    Registered User
    Join Date
    10-30-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    20

    Re: If condition with blank cells

    Perfect! Thank you!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: If condition with blank cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Registered User
    Join Date
    12-13-2016
    Location
    Kolkatta, India
    MS-Off Ver
    2010
    Posts
    6

    Re: If condition with blank cells

    PL ignore . I have posted this in forum.

    Request your guidance for counting blank cells with multiple conditions. I have a column "E" with town names and another column "F" with type of town and I want to count the number of blank cells in column "G" against the town and type.
    Last edited by Harshaman; 12-07-2017 at 03:16 AM. Reason: I have posted the Q in the forum

+ 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. Replies: 4
    Last Post: 02-24-2017, 02:39 AM
  2. Replies: 11
    Last Post: 06-19-2014, 09:34 AM
  3. Trying to add a 2nd condition and return no value in blank cells
    By eddienole in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2014, 05:09 PM
  4. counting blank cells in range based on condition using another column
    By TheBlueBell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2013, 04:58 PM
  5. Count non-blank cells with condition
    By isabella in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2010, 03:59 AM
  6. Replace blank cells in a column with condition
    By Falantar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-26-2009, 12:54 PM
  7. How to return blank cells only if a certain condition is met
    By AlmostAGeek in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-24-2007, 07:22 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