LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Bill
 
Posts: n/a
Default Using "IF" and "AND" statements with current time

I'm working on a somewhat complex function trying to have excel make a choice
based on current time. Here is the statement I'm trying to use:
=IF(AND(NOW()A17,NOW()<A18),(IF(HLOOKUP(TODAY()-1,$B$1:$T$32,ROW($A$3))="","P",HLOOKUP(TODAY()-1,$B$1:$T$32,ROW($A$3)))),(IF(HLOOKUP(TODAY(),$B$1 :$T$32,ROW($A$3))="","P",HLOOKUP(TODAY(),$B$1:$T$3 2,ROW($A$3)))))
A17 and A18 will contain time values to create a "window of time" where I
want the current time to either fall within or outside of. Based on this,
the function should make a choice on where to look up data.
I'm creating a scheduling sheet for work and we work rotating shift
schedules. The problem is that if we work a mid shift the current time will
move from the current day to the next but I need the look up to use the
current day (when we start work) and not the one after midnight for the
attendance log. The HLOOKUP function is used to populate a column with the
current days scheduled attendance) If I use static values instead of the
NOW() function the statement seems to work but I need to use NOW() to
correctly interpret the current day/time (I think). Any ideas how I can
accomplish this using the NOW() function??
Thanks,
Bill
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"