+ Reply to Thread
Results 1 to 3 of 3

Need to display date if reference is a date, else the cell above it.

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Need to display date if reference is a date, else the cell above it.

    I need a formula that will look to the cell right of it and if it is a date, then it will display it. If it is not a date, then it displays the cell above cell with the formula. A simple example has been attached.
    Attached Files Attached Files
    Last edited by The Phil; 03-19-2010 at 05:23 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Need to display date if reference is a date, else the cell above it.

    Hi,

    Does this work?

    =IF(LEN(B6)=9,B6,A5)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Need to display date if reference is a date, else the cell above it.

    Quote Originally Posted by oldchippy View Post
    Hi,

    Does this work?

    =IF(LEN(B6)=9,B6,A5)
    Yes and no. It works, but it carries over the format of the date cell and displays it as 2-Mar-10, even thought the properties of the cell are set to display it as 03/02/2010. I added to it though and it works great now. Thanks!!!

    =TEXT(IF(LEN(B67)=9,B67,A66),"MM/DD/YYYY")+0

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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