Hi
How can i do that
If Time In cell A1>= 10.00 am then write " Open " in cell A2
If Time In cell A1>= 3.00 PM then Write " closed " in cell A2
Thank's
Hi
How can i do that
If Time In cell A1>= 10.00 am then write " Open " in cell A2
If Time In cell A1>= 3.00 PM then Write " closed " in cell A2
Thank's
Last edited by VBA Noob; 01-04-2009 at 03:27 PM.
One Way:
=LOOKUP(HOUR(N(A1)),{0,10,15},{"","Open","Closed"})
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thank's soooo much
One More Question
If also today saturday or sunday then write " closed " in cell A2
Thank's
Not sure if you actually want today's date or a date in A1 but you could adapt DonkeyOte's formula like this
=IF(WEEKDAY(TODAY(),2)<6,LOOKUP(HOUR(A1),{0,10,15},{"","Open","Closed"}),"Closed")
This formula will alway give "Closed" if today is Tuesday or Friday
=IF(OR(WEEKDAY(TODAY())={3,6}),"Closed",LOOKUP(HOUR(A1),{0,10,15},{"","Open","Closed"}))
In this part {3,6}
3 represents Tuesday and 6 Friday (1=Sunday throught to 7 = Saturday) so you can change that part to whichever numbers you want
Big Thank's
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks