+ Reply to Thread
Results 1 to 4 of 4

If Statements and blank cells

  1. #1
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    If Statements and blank cells

    Hi everyone,

    I'm trying to solve a problem I have with an IF statement and blank cells. I've got a worksheet called "Product Register" which contains details of products (serial numbers (col A), description (col B) and expiry date (col C)). I'd like to add four columns at the end of this sheet as follows: Expiry date unknown, Expired, Expires in 30 days, Expires in 90 days. I've put the NOW() function in cell D1 to give me todays date. Some of the expiry dates of products are currently unknown so Column C may contains blanks. Can anyone give me the function to write into each of the following please returning a "Yes" in only one of the columns:

    Expiry date unknown:
    Expired:
    Expires in next 30 days or less:
    Expires between 30 days and 90 days:

    Any help much appreciated

    N

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: If Statements and blank cells

    try
    =IF( C2="", "Expiry date unknown",IF( C2 < TODAY(), "Expired", IF( C2<=TODAY()+30, "Expires in next 30 days or less", IF( C2<=TODAY()+90, "Expires between 30 days and 90 days", ""))))
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: If Statements and blank cells

    Thanks so much etaf!! You'r approach is so much simpler, I was tangling myself in knots trying to have the categories in separate columns. So simple when you look at it! D'oh.

    Thanks very much for your help

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: If Statements and blank cells

    you are welcome

+ 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] If Blank Statements in Formulas
    By davidpierce in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-13-2016, 05:55 AM
  2. IF Statements, Dates, %, and Blank Cells
    By Karenh119 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2015, 04:00 PM
  3. Count blank cells in a range and contiguous blank cells also as single cells! Tricky One!
    By SebastianColombia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 02:32 PM
  4. [SOLVED] COUNTIF and IF statements to count non-blank cells only
    By rowena229 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-25-2015, 01:57 PM
  5. Nested If statements. I wanted blank/empty cells to not show 0
    By fleetwood417 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2013, 11:09 AM
  6. Multiple If Statements and a Blank
    By theperson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2013, 02:32 PM
  7. Blank if statements
    By cjohnsen in forum Excel General
    Replies: 3
    Last Post: 05-11-2007, 05:57 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