Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old July 20th 17, 08:39 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2014
Posts: 852
Default IF,AND,OR formula

Can't figure which combo of IF/AND, IF/OR, IF/AND/OR to use and not able to get the logic straight in the formula.

N2 is a weight price from an INDEX/MATCH formula
N3 is the MIN price to be charged for N2
N4 is the MAX price to be charged for N2

If N2 is less than MIN then MIN
If N2 is greater than MAX then MAX
If N2 = Min OR N2 <= MAX then N2 (N2 is between MIN and MAX inclusive)

Thanks,
Howard



  #2   Report Post  
Old July 20th 17, 09:45 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,713
Default IF,AND,OR formula

Hi Howard,

Am Thu, 20 Jul 2017 12:39:49 -0700 (PDT) schrieb L. Howard:

Can't figure which combo of IF/AND, IF/OR, IF/AND/OR to use and not able to get the logic straight in the formula.

N2 is a weight price from an INDEX/MATCH formula
N3 is the MIN price to be charged for N2
N4 is the MAX price to be charged for N2

If N2 is less than MIN then MIN
If N2 is greater than MAX then MAX
If N2 = Min OR N2 <= MAX then N2 (N2 is between MIN and MAX inclusive)


try:
=MAX(MIN(N2;N4);N3)


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Old July 20th 17, 10:20 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2014
Posts: 852
Default IF,AND,OR formula

On Thursday, July 20, 2017 at 1:45:06 PM UTC-7, Claus Busch wrote:
Hi Howard,

Am Thu, 20 Jul 2017 12:39:49 -0700 (PDT) schrieb L. Howard:

Can't figure which combo of IF/AND, IF/OR, IF/AND/OR to use and not able to get the logic straight in the formula.

N2 is a weight price from an INDEX/MATCH formula
N3 is the MIN price to be charged for N2
N4 is the MAX price to be charged for N2

If N2 is less than MIN then MIN
If N2 is greater than MAX then MAX
If N2 = Min OR N2 <= MAX then N2 (N2 is between MIN and MAX inclusive)


try:
=MAX(MIN(N2;N4);N3)


Regards
Claus B.


Now that's a hoot! If I had not seen that formula in other situations, I would think you invented for me alone for this one.

I guess I never looked closely at what ever it was solving, therefore remained in the dark about it.

Thanks.

Howard


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 autofill to cells below formula arguments are cell areas in different columns [email protected] Excel Discussion (Misc queries) 1 September 7th 12 09:15 PM
Build formula using field values as text in the formula referencing another workbook solardirect Links and Linking in Excel 6 June 4th 12 10:47 PM
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 01:59 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017