+ Reply to Thread
Results 1 to 10 of 10

logical formula for date

  1. #1
    Registered User
    Join Date
    06-22-2014
    Location
    uk
    MS-Off Ver
    2007
    Posts
    4

    logical formula for date

    Hi, new to the forum and looking for some help please. Sure it's a really simple solution as it's just something simple I'm trying to do. In column N I have a list of dates. In column Z I want to display either "Yes" where the date in column N has already passed or "No" if the date in column N has not passed. The formula I'm using in column Z is =IF(N2<TODAY(),"Y","N") however it just gives me "No" on every row regardless of whether date is passed or not.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: logical formula for date

    that should work
    is the date in column N actually a Date ? or text

    can you attach a sample sheet
    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
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: logical formula for date

    most likely your dates are text that look like dates
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    06-22-2014
    Location
    uk
    MS-Off Ver
    2007
    Posts
    4

    Re: logical formula for date

    checked the formatting on column N and that column is definitely formatted as dates. is there any way i can upload the spreadsheet on to this thread?

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: logical formula for date

    to Attach a sample workbook.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Registered User
    Join Date
    06-22-2014
    Location
    uk
    MS-Off Ver
    2007
    Posts
    4

    Re: logical formula for date

    there we go. cheers
    Attached Files Attached Files

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: logical formula for date

    if you do N2+1 what result do you get
    also try
    =Cell("format",N2)
    do you get a result starting with D

    you can upload a spreadsheet here
    go advanced
    click on the paperclip symbol
    and upload the spreadsheet

  8. #8
    Registered User
    Join Date
    06-22-2014
    Location
    uk
    MS-Off Ver
    2007
    Posts
    4

    Re: logical formula for date

    Quote Originally Posted by etaf View Post
    if you do N2+1 what result do you get
    also try
    =Cell("format",N2)
    do you get a result starting with D

    you can upload a spreadsheet here
    go advanced
    click on the paperclip symbol
    and upload the spreadsheet
    I've just changed the format of the cells to number to see if that made a difference. doing the avbove comes back with an answer of F2????

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: logical formula for date

    click on column N
    then goto
    DATA
    Text to columns
    Delimited
    next, next

    now it will work, as the date is now seen as a date and not text

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: logical formula for date

    they are text
    select column N
    then data tab/text to columns/delimited then click finish that should sort them out

  11. #11
    Registered User
    Join Date
    06-22-2014
    Location
    uk
    MS-Off Ver
    2007
    Posts
    4

    Re: logical formula for date

    brilliant. that has worked for column z. however, the dates in column N are now displayed as decimal numbers 41236.00 etc. how can i fix them? I'd never heard of this delimited thing. i thought you formatted just by right click then change to date in the drop down list???

    edit: sorted the column N issue by right click and change to date in drop down. thanks all for the quick fix. what is this delimited thing though? never heard of it

  12. #12
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: logical formula for date

    Another way to do this when you have formatted a column as Date but Dates are not behaving like Dates but text. While the column is formatted as Date, select the first cell in that column -->Ctrl+Shift-->Down Arrow Key to select whole range --> press Ctrl+Enter and that will fix the issue.
    I did the same with your attached sample workbook in col. N and the issue was resolved immediately.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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: 1
    Last Post: 12-04-2012, 01:59 AM
  2. Logical test formula not updating when date is changed
    By MLBarie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-16-2012, 10:52 AM
  3. Logical Formula
    By Saturn in forum Excel General
    Replies: 3
    Last Post: 10-02-2011, 05:47 PM
  4. Logical test? Showing when a date has expired
    By WTB in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-02-2010, 08:38 AM
  5. Logical Formula
    By weintz1 in forum Excel General
    Replies: 2
    Last Post: 09-18-2007, 12:34 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