Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default Create formula-if value A falls between values B and C in time for

Struggling how to create a formula to check if a value falls between two
others where one value is another calculation. My data is:

A B C D
1 07:00:00 07:10:00 07:30:00 08:15:00

I want to say " if B1 falls between A1 and A1+15 minutes, then subtract A1
from D1.
There are other conditions I have written that this will be added to.
Look forward to an elegant solution.
--
Thanks!!
Don
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Create formula-if value A falls between values B and C in time for

Maybe one way:
=IF(AND(B1=A1,B1<=(A1+15)),D1-A1)

HTH,
Paul

"Don" wrote in message
...
Struggling how to create a formula to check if a value falls between two
others where one value is another calculation. My data is:

A B C D
1 07:00:00 07:10:00 07:30:00 08:15:00

I want to say " if B1 falls between A1 and A1+15 minutes, then subtract A1
from D1.
There are other conditions I have written that this will be added to.
Look forward to an elegant solution.
--
Thanks!!
Don



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Create formula-if value A falls between values B and C in time for

Did you try it?

This will always return TRUE if B1 is entered as a time, since times are
less than 1, and A1+15 is 1

In article ,
"PCLIVE" wrote:

Maybe one way:
=IF(AND(B1=A1,B1<=(A1+15)),D1-A1)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Create formula-if value A falls between values B and C in time for

Sorry JE. You're correct. I skimmed through this one fast and did not pay
attention to the fact that these were times.
Thanks for the correction.

Paul

"JE McGimpsey" wrote in message
...
Did you try it?

This will always return TRUE if B1 is entered as a time, since times are
less than 1, and A1+15 is 1

In article ,
"PCLIVE" wrote:

Maybe one way:
=IF(AND(B1=A1,B1<=(A1+15)),D1-A1)



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Create formula-if value A falls between values B and C in time for

One way:

XL times are stored as fractional days. Since there are 1440 minutes in
a day, this will work:

=IF(MOD(B1-A1,1)<=15/1440, MOD(D1-A1,1), "something else")

The MOD(xxx,1) allows for times to span midnight.



In article ,
Don wrote:

Struggling how to create a formula to check if a value falls between two
others where one value is another calculation. My data is:

A B C D
1 07:00:00 07:10:00 07:30:00 08:15:00

I want to say " if B1 falls between A1 and A1+15 minutes, then subtract A1
from D1.
There are other conditions I have written that this will be added to.
Look forward to an elegant solution.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default Create formula-if value A falls between values B and C in time

Worked as designed. Now to link it to the other statements.

First experience with this discussion group and could not be more pleased.

Thanks all
--
Thanks!!
Don


"JE McGimpsey" wrote:

One way:

XL times are stored as fractional days. Since there are 1440 minutes in
a day, this will work:

=IF(MOD(B1-A1,1)<=15/1440, MOD(D1-A1,1), "something else")

The MOD(xxx,1) allows for times to span midnight.



In article ,
Don wrote:

Struggling how to create a formula to check if a value falls between two
others where one value is another calculation. My data is:

A B C D
1 07:00:00 07:10:00 07:30:00 08:15:00

I want to say " if B1 falls between A1 and A1+15 minutes, then subtract A1
from D1.
There are other conditions I have written that this will be added to.
Look forward to an elegant solution.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If time falls within time.. GettingThere Excel Worksheet Functions 5 March 19th 07 11:02 AM
Possible to create line chart with values not in all time periods? CodeKid Charts and Charting in Excel 1 December 1st 06 01:51 AM
Formula has to take Monday if due date falls on a Sunday Revathi Excel Worksheet Functions 2 April 28th 06 12:09 PM
Countif if the value falls between 2 other values les8 New Users to Excel 3 December 7th 05 09:58 PM
Formula to determine whether number falls within range?? Cat Excel Worksheet Functions 4 September 17th 05 03:01 AM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"