Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default IF, OR, AND FUNCTION HELP

This is my actual formula.
=IF(OR(AND(D$25="GENERAL",D$25="THIEME"),($F$5*33)-(D$58+D$59)0),($F$5*33)-(D$58+D$59),IF(OR(AND(D$25="EAGLE",D$25="GENIE",D$ 25="APACHE"),($F$5*28)-(D$58+D$59)0),($F$5*28)-(D$58+D$59),0))

I need it to return 44 if D25=General or Thieme, and return 19 if Eagle,
Genie, or Apache.

Right now, it returns 44, regardless of what I put in D25.

D25=Genie, F5=5, D58=121, D59=0
It is calculating 5*33-121, and I need it to calculate 5*28-121

Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default IF, OR, AND FUNCTION HELP

On Jul 3, 10:22 am, talltom wrote:
This is my actual formula.
=IF(OR(AND(D$25="GENERAL",D$25="THIEME"),($F$5*33)-(D$58+D$59)0),
($F$5*33)*-(D$58+D$59),IF(OR(AND
(D$25="EAGLE",D$25="GENIE",D$25="APACHE"),($F$5*28 )-(*D$58+D$59)0),
($F$5*28)-(D$58+D$59),0))

I need it to return 44 if D25=General or Thieme, and return 19 if Eagle,
Genie, or Apache.

Right now, it returns 44, regardless of what I put in D25.

D25=Genie, F5=5, D58=121, D59=0
It is calculating 5*33-121, and I need it to calculate 5*28-121


Ostensibly, reverse the order of OR and AND. That is:

AND(OR(D$25="GENERAL",D$25="THIEME"),($F$5*33)-(D$58+D$59)0)

However, I suspect the following simplification will work equally well
for you, and it might be easier to read and maintain:

=IF(OR(D$25="GENERAL",D$25="THIEME"), MAX(0, $F$5*33 - (D$58+D$59)),
IF(OR(D$25="EAGLE",D$25="GENIE",D$25="APACHE"),
MAX(0, $F$5*28 - (D$58+D$59)) , 0))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default IF, OR, AND FUNCTION HELP

Thank You Joe. This is working great. I am using the option you offered.

"joeu2004" wrote:

On Jul 3, 10:22 am, talltom wrote:
This is my actual formula.
=IF(OR(AND(D$25="GENERAL",D$25="THIEME"),($F$5*33)-(D$58+D$59)0),
($F$5*33)--(D$58+D$59),IF(OR(AND
(D$25="EAGLE",D$25="GENIE",D$25="APACHE"),($F$5*28 )-(-D$58+D$59)0),
($F$5*28)-(D$58+D$59),0))

I need it to return 44 if D25=General or Thieme, and return 19 if Eagle,
Genie, or Apache.

Right now, it returns 44, regardless of what I put in D25.

D25=Genie, F5=5, D58=121, D59=0
It is calculating 5*33-121, and I need it to calculate 5*28-121


Ostensibly, reverse the order of OR and AND. That is:

AND(OR(D$25="GENERAL",D$25="THIEME"),($F$5*33)-(D$58+D$59)0)

However, I suspect the following simplification will work equally well
for you, and it might be easier to read and maintain:

=IF(OR(D$25="GENERAL",D$25="THIEME"), MAX(0, $F$5*33 - (D$58+D$59)),
IF(OR(D$25="EAGLE",D$25="GENIE",D$25="APACHE"),
MAX(0, $F$5*28 - (D$58+D$59)) , 0))


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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 09:59 PM.

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"