Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF-Then formula problem

I am using the attached formula, but need to modify it to within a range.
Here is the existing formula:

Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
I need to have the first IF statement to me like this, where MaxTAT=180
(for now):

Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. Am I missing something REALLY basic here?

Thanks for any help. Bill in Northern California

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF-Then formula problem

Believe you meant to do this:
=IF(AND(M2-L20,M2-L2<MaxTAT),ROUND((M2-L2)*1440,0),"")

[Using an AND construct, and with extra parens removed]
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bill Elerding" wrote:
I am using the attached formula, but need to modify it to within a range.
Here is the existing formula:

Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
I need to have the first IF statement to me like this, where MaxTAT=180
(for now):

Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. Am I missing something REALLY basic here?

Thanks for any help. Bill in Northern California

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF-Then formula problem

You need to amend your formula like this:

=IF(AND(MaxTATM2-L2,M2-L20),ROUND((M2-L2)*1440,0)," ")

I've also removed two pairs of redendant brackets.

Hope this helps.

Pete

On Mar 24, 6:47*pm, Bill Elerding <Bill
wrote:
I am using the attached formula, but need to modify it to within a range. *
Here is the existing formula:

Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
*I need to have the first IF statement to me like this, where MaxTAT=180
(for now):

Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") *I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. *When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. *Am I missing something REALLY basic here?

Thanks for any help. *Bill in Northern California


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF-Then formula problem

Thanks, Max. It worked like a charm. -Bill

"Max" wrote:

Believe you meant to do this:
=IF(AND(M2-L20,M2-L2<MaxTAT),ROUND((M2-L2)*1440,0),"")

[Using an AND construct, and with extra parens removed]
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bill Elerding" wrote:
I am using the attached formula, but need to modify it to within a range.
Here is the existing formula:

Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
I need to have the first IF statement to me like this, where MaxTAT=180
(for now):

Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. Am I missing something REALLY basic here?

Thanks for any help. Bill in Northern California

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF-Then formula problem

Great, thanks for the help. Of course, once I put in the fix, I had to also
remember to multiply the M2-L2 by 1440 to convert the times back to minutes.
Sometimes the simplest things... -Bill

"Pete_UK" wrote:

You need to amend your formula like this:

=IF(AND(MaxTATM2-L2,M2-L20),ROUND((M2-L2)*1440,0)," ")

I've also removed two pairs of redendant brackets.

Hope this helps.

Pete

On Mar 24, 6:47 pm, Bill Elerding <Bill
wrote:
I am using the attached formula, but need to modify it to within a range.
Here is the existing formula:

Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
I need to have the first IF statement to me like this, where MaxTAT=180
(for now):

Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. Am I missing something REALLY basic here?

Thanks for any help. Bill in Northern California





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF-Then formula problem

Good to hear that, and thanks for feeding back.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bill Elerding" wrote in message
...
Thanks, Max. It worked like a charm. -Bill



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF-Then formula problem

Yes, I thought you were doing something with time. Glad to hear you
got it to work.

Pete

On Mar 25, 5:59*am, Bill Elerding
wrote:
Great, thanks for the help. *Of course, once I put in the fix, I had to also
remember to multiply the M2-L2 by 1440 to convert the times back to minutes. *
Sometimes the simplest things... *-Bill



"Pete_UK" wrote:
You need to amend your formula like this:


=IF(AND(MaxTATM2-L2,M2-L20),ROUND((M2-L2)*1440,0)," ")


I've also removed two pairs of redendant brackets.


Hope this helps.


Pete


On Mar 24, 6:47 pm, Bill Elerding <Bill
wrote:
I am using the attached formula, but need to modify it to within a range. *
Here is the existing formula:


Formula =IF((M2-L20),(ROUND(((M2-L2)*1440),0))," ")
*I need to have the first IF statement to me like this, where MaxTAT=180
(for now):


Revision =IF((MaxTATM2-L20),(ROUND(((M2-L2)*1440),0))," ") *I want the
formula to round the answer if M2-L2 is between 0 and 180, or leave it blank
if not. *When I put the formula in as this, it appears to only consider the
M2-L20 part of the formula. *Am I missing something REALLY basic here?


Thanks for any help. *Bill in Northern California- Hide quoted text -


- Show quoted text -


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
Formula Problem Excellerated Excel Discussion (Misc queries) 1 August 24th 07 06:50 PM
Formula Problem Secret Squirrel Excel Discussion (Misc queries) 3 August 2nd 07 03:01 AM
problem with formula Sy. Excel Discussion (Misc queries) 0 January 23rd 06 02:53 PM
Problem with formula Sundaram Iyer Excel Discussion (Misc queries) 0 June 1st 05 12:49 AM
Formula Problem Tracey BVS Excel Discussion (Misc queries) 2 December 9th 04 11:50 AM


All times are GMT +1. The time now is 04:17 AM.

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

About Us

"It's about Microsoft Excel"