×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Excel greater than less than time

## Excel greater than less than time

(OP)
Hello, Im loooking for some help with a little project.

I have two cells with time formatted value that I need to get a count on. For example, cell C2 has a time of 5:00 in it and cell D2 has a time of 14;00 listed in it. From there, cells E1 through M1 have the time broken up hourly across them, such as E1 has 5:00, F1 has 6:00, and so on.

What Im looking for is to have a 1 listed in the corresponding cells beneath it, so something similar to the following

IF cell E1(5:00) is greater than cell C2(5:00) and less than cell D2(14:00), then cell E2 = 1

I hope this makes sense. Im on a tablet right now and cant show exactly what im trying to do right now but i will post a screenshot of it when i get back to my laptop. Just wanted to throw this out now to see what kind of help i can get.

### RE: Excel greater than less than time

(OP)
Below is an example of what I'm trying to do, I just can't figure out the right way to do it

Any help is appreciated

### RE: Excel greater than less than time

Hi,

I’m on my iPad, so this is untested.

Enter this into E2...

=IF(AND($C2<=E$1,$D2>=E$1),1,0)

Then COPY ‘n’ PASTE into all.

Skip,

Just traded in my OLD subtlety...
for a NUance!

### RE: Excel greater than less than time

(OP)
Thanks Skip! That works exactly how I wanted. Much appreciated!!

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!