Thursday, December 20, 2007

NOW() + n in Excel and weekends

In Excel:

Display the current time plus two days:
=TEXT(NOW()+2,"dd/mm/yyyy hh:mm:ss")

Display the current time plus two working days (skip weekends):
=TEXT(WORKDAY(NOW(),2),"dd/mm/yyyy") &TEXT(NOW()," hh:mm:ss")


N.B. If the WORKDAY function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
  1. On the Tools menu, click Add-Ins.
  2. In the Add-Ins available list, select the Analysis ToolPak box, and then click OK
  3. If necessary, follow the instructions in the setup program.

0 comments:

Post a Comment

I get a lot of comment spam :( - moderation may take a while.