formula / code help needed

  • Thread starter Thread starter Paul Watkins
  • Start date Start date
P

Paul Watkins

Hi
I have a sheet with column C (start time) & column D (end time). (C1:D50)
e.g

C D
07:45 07:50
07:48 08:05

In Cell A1 i have the time '08:00' and in cell A2 '08:20'.

What i want to do is look at the range C1:D50 and determine if any values
fall between 08:00 and 08:20. If they do, change the corrosponding cell in
column E to equal 10.


C D E
07:45 07:50
07:48 08:05 10

Some sort of formula or vb code along the lines of If any cell in Range
C1:D50 is between 08:00 and 08;20 then in that row the cell in column E
becomes 10

can anyone help?

Thanks in advance
Paul Watkins
 
paste this formula into cell E1 and copy it down

=IF(OR(AND($A$1<D1,D1<$B$1),AND($A$1<C1,C1<$B$1)),10,0)
 
Thanks, that works perfectly.

Paul


Duke Carey said:
paste this formula into cell E1 and copy it down

=IF(OR(AND($A$1<D1,D1<$B$1),AND($A$1<C1,C1<$B$1)),10,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Match formulae 1
help with formula 3
Difference in time 7
Pls help for Simple Calculation 1
macro help 1
Delete Row with condition 4
How to determine the score? 1
Conditional Formatting 1

Back
Top