Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-22-2017, 09:10 AM
texascpa texascpa is offline If And conditions for Time Windows XP If And conditions for Time Office 2010 64bit
Novice
If And conditions for Time
 
Join Date: Sep 2012
Posts: 19
texascpa is on a distinguished road
Default If And conditions for Time

Column A = time formatted in military time : 9:50
Column B= “Include” if time is between 7:59 (i.e., 7:59AM and 17:59 (i.e., 5:59 PM). If outside those parameters, “” in Column B.
This is my formula:
=IF(AND(A511>TIMEVALUE("7:59:00"),A511<TIMEVALUE(" 17:59:00")),"Include","")
The return value in Column B is “” when the time is within the parameters. The return value should be “Include”.
Need help with the formula
Reply With Quote
  #2  
Old 11-22-2017, 09:26 AM
ArviLaanemets ArviLaanemets is offline If And conditions for Time Windows 8 If And conditions for Time Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Code:
=IF(AND(A511>=TIME(8,0,0),A511<TIME(18,0,0)),"Include","")
Reply With Quote
  #3  
Old 11-22-2017, 09:52 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If And conditions for Time Windows 7 64bit If And conditions for Time Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,767
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Could you please post a small sample sheet with some data ( go advanced - Manage attachments)
Military time is like 0950 not 9:50
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #4  
Old 11-22-2017, 10:59 AM
texascpa texascpa is offline If And conditions for Time Windows XP If And conditions for Time Office 2010 64bit
Novice
If And conditions for Time
 
Join Date: Sep 2012
Posts: 19
texascpa is on a distinguished road
Default Your help

The formula did not work and I think it is due to the way I have time formatted. I used the drop down menu in Excel and selected the format 13:30 which I thought was military time but times in my spread sheet less than 12 pm did not have 0 (e.g., 0930). The time in the cell was 9:30. I tried other formats and none work. Any thoughts?
Reply With Quote
  #5  
Old 11-22-2017, 11:32 AM
ArviLaanemets ArviLaanemets is offline If And conditions for Time Windows 8 If And conditions for Time Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Probably your time is really a datetime formatted to show time part only.

Try to format cell with time in table as datetime, like "yyyy.mm.dd hh:nn:ss", and then look at data. When the date part is 01.01.1900, then the field is time only, otherwise it is datetime.

I prefer to format dates with Custom format - in your case it will be "hh:nn".
Reply With Quote
  #6  
Old 11-23-2017, 01:06 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If And conditions for Time Windows 7 64bit If And conditions for Time Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,767
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Please post a sheet as requested in post #3.
There are various possibilities where time and dates are concerned, that we could keep guessing a long while. A sheet would help find the answer much faster
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum with conditions xling Excel 2 08-15-2017 12:16 AM
Sumif with Conditions Haha88 Excel 2 12-21-2016 12:08 AM
6 conditions formula paconovellino Excel 2 03-05-2012 06:45 AM
If And conditions for Time 3 Conditions Laurie B. Excel 4 08-15-2011 10:27 PM
how to set an equation with three conditions? Jamal NUMAN Word 0 07-09-2011 06:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft