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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel 2010 - Append time at the end of Weekday Formula 1

Status
Not open for further replies.

BxWill

MIS
Mar 30, 2009
367
US
Not having any success with appending "10:00 PM" to a Weekday formula in a worksheet, using MS Excel 2010.

The formula displays a deadline date conditional on the date entered in cell D7.

Specifically, I would like to append "6:00 PM" to the formula so that I can compare result to another cell
on my worksheet that contains a date and time value.

=IF(OR(WEEKDAY(D7)=2,WEEKDAY(D7)=3,WEEKDAY(D7)=4),D7+7-WEEKDAY(D7+7-5),D7+7-WEEKDAY(D7+7-2))& " 6:00 PM"

For example, I currently have "1/25/2016" in cell D7 and would like to compare it to cell F7 that displays "4/21/16 21:25" (although I entered 4/21/2016 9:25:01 PM).

I would like for cell D7 to display "1/25/2016 10:00 PM" and cell F7 to display "4/21/2016 9:25:01 PM" so that I can readily compare the two dates to determine the number of days that I am past due.

Any insight as to the modifications to the formula that is needed that will allow a time component to display?

Also, is it possible for the value in cell F7 to display as 4/21/2016 9:25:01 PM?

Thanks in advance.
 
HI,

Check out FAQ68-5827

Just add TIME(18,0,0) rather that appending the TEXT "6:00 PM"

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top