1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel 2007 - If "Yes" return todays date

Discussion in 'Business Applications' started by johnlad, Jan 19, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. johnlad

    johnlad Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    6
    Hi,

    I'm setting up a spreadsheet for work to help track some work. I have a drop down menu with "Yes" and "No" options set up in cell E2 and I am trying to return todays date in cell F2 if E2 equals "Yes". I have tried a few different things but I can't seem to get it to return the date. This would allow me to confirm when a job has been completed (E2= "Yes") and then return the days date automatically in the cell next to it (F2). Any help with this would be greatly sppreciated :D
     
  2. gyclone

    gyclone

    Joined:
    Jan 16, 2011
    Messages:
    119
    This should do it (place this code in cell F2):

    Code:
    =IF(E2="yes",TEXT(TODAY(),"mm/dd/yyyy"),"")
    
    The "TEXT" portion of the formula formats the date. Feel free to play around with the "mm/dd/yyyy" section if you need a different date format.
     
  3. johnlad

    johnlad Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    6
    Thank you for the reply, but this does not seem to work. I pasted the code into the date field (F2) but instead of returning the date it just displays 'TRUE'. This is also the case if I cahnge the 'Yes/No' field (E2) to 'No'. If you have any other suggestions they would be greatly appreciated.
     
  4. johnlad

    johnlad Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    6
    I have just tried it in a seperate cell where the drop down box is not active and it works. It seems that the drop down caused the problem. Is there anyway that it would work with the drop down active? I have set the 'Yes/No' values in seperate cells off to the side of the main sheet
     
  5. gyclone

    gyclone

    Joined:
    Jan 16, 2011
    Messages:
    119
    I was afraid the drop down would cause problems and I didn't have time to check for sure. You can try manually writing the formula in F2 and, instead of typing E2, click on the dropdown itself and see what gets added to the formula and adjust accordingly. I'll be happy to look at it again in the "morning", but it's 5:30 AM here and I was just about to call it a "night". Sorry.
     
  6. johnlad

    johnlad Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    6
    Brilliant, that solved it. Thanks a lot for your help.
     
  7. gyclone

    gyclone

    Joined:
    Jan 16, 2011
    Messages:
    119
    You are welcome! I'm glad I could help! Also, you did a very good job of describing exactly what you needed and I shouldn't have posted until I had recreated your exact scenario, so I apologize for being half-assed in my original response.

    Cheers!
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/975578

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice