Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant read date from a cell

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I currently have the date I want to start with in cell B5 the date is 1/31/2013
The formula I am using is in cell B8 the value in cell C8 is 1.

The formula I am using is =IF(C8=1,DATEVALUE(B5)).

I am getting the #VALUE# error.

The formula worked when I had IF(C8=1,DATEVALUE("1/31/2013")).
My goal is"
if C8 = 1 then I display the workdate in B8 as Thu, January 31, 2013
if C10 = 2 then Cell B8 would add the next workdate Fri, February 01, 2013
if C12 = 3 then Cell B8 would go to the next workdate Mon, February 04, 2013

Is this possible?


Tom



 
Hi,

The DateValue() function CONVERTS text to date. I would assume that B5 contains a date and not text.


Understanding Dates and Times & why they seem to be so much trouble? faq68-5827

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
Thanks B5 is a date. I just figured out what I was doing wrong. Because B5 is a date I changed the function to =WORKDAY(B5,C9-1) and this is working fine.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top