Solved I am using dates in an if/and statement.

January 8, 2018 at 04:41:41
Specs: Windows 7
(Cell F16) (Cell H16)
2017-12-24 17:47:22 06:38:06
2017/12/25 06:38:06 AM (value in cell H16)
=F16=DATEVALUE("2017-12-24") TRUE
=H16>DATEVALUE("2017/12/24 00:00:00 AM") TRUE
=H16-DATEVALUE("2017/12/24 00:00:00 AM") 06:38:06

I checked the statements separately and they work. But when I combine this I get an error.


See More: I am using dates in an if/and statement.

Report •

#1
January 8, 2018 at 05:30:15
Allow me to offer a couple of posting tips...

1 - Please click on the How-To link at the end of this post and read the instructions on how to format example data so that it is easier for us to read. Then edit/repost your data so that the columns line up correctly. Don't forget to use Column letters and Row numbers as shown in the example.

2 - I don't see the the "combined" formula in your post. It's really hard for us to help you with your "combined" formula if we don't know what you are actually using. The best way to post formulas that are working (and not working) is to copy the exact formulas from your worksheet and paste them into your post.

3 - Telling us that you get "an error" doesn't give us much to work with. There are so many possible errors that Excel can present. It would help us help you if we knew what error you were getting.

If you will follow these tips, we will have a clearer picture of not only your data, but also of your formulas and errors.

Thanks!

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code

message edited by DerbyDad03


Report •

#2
January 8, 2018 at 12:01:30
✔ Best Answer
Sorry, having trouble with your display.

What is the value in cell F16, and how is the cell formatted?

What is the value in cell H16 and how is the cell formatted?

Are you trying to determine the number of hours between the two cells?

If yes, have you tried simple subtraction? IE: =H16-F16

 
       F               G                  H               I  
16) 12/25/2017 0:00                  12/25/2017 6:38	6:38

Make sure your cell I16 is formatted as H:MM


MIKE

http://www.skeptic.com/

message edited by mmcconaghy


Report •
Related Solutions


Ask Question