View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] thomas292@gmail.com is offline
external usenet poster
 
Posts: 3
Default time decision for open file in Excel

if 20 hours before current time is today,then open file A
if 20 hours before current time is yesterday,then open file B,
use below formula can work
if (NOW ()-TIME(19,59,59)<TODAY (),"Y","N")

but how to change it as excel macro such that "Y" become "open file A" and "N" become "open file B".

Can I use IF ...THEN...to do this?

thx!