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

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 
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.
 

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.
 

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
 
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.
 
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!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top