Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Think I need a MAX / MIN formula here (help needed)

Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Think I need a MAX / MIN formula here (help needed)

By the sound of it, you didn't mean DO NOT EXCEED A1, but you presumably
mean DO NOT EXCEED A1-B2 ?
You could use =IF(B2<A1,MIN(C2,A1-B2),"whatever you want if B2=A1")

If the answer you want if B2=A1 is zero, you might try =MEDIAN(0,B2-A1,C2)
but in that case you might want a further trap to deal with cases where C2
is less than zero.
--
David Biddulph


"Mark D" wrote in message
...
Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Think I need a MAX / MIN formula here (help needed)

Think over your example!
Therefore this should return 2 What is this 2, it doesn't show up in the example.


=IF(B2<A1,min(C2,A1),"whatif B2=A1")

returns C2 if B2<A1 but A1 if C2A1 (won't exceed A1) but you didn't specify
the case B2=A1.

--
Regards!
Stefi



€˛Mark D€¯ ezt Ć*rta:

Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Think I need a MAX / MIN formula here (help needed)

Sorry yep that was silly

If B2 is than A1 then the result should be 0

"Stefi" wrote:

Think over your example!
Therefore this should return 2 What is this 2, it doesn't show up in the example.


=IF(B2<A1,min(C2,A1),"whatif B2=A1")

returns C2 if B2<A1 but A1 if C2A1 (won't exceed A1) but you didn't specify
the case B2=A1.

--
Regards!
Stefi



€˛Mark D€¯ ezt Ć*rta:

Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Think I need a MAX / MIN formula here (help needed)

Then
=IF(B2<A1,min(C2,A1),0)

--
Regards!
Stefi



€˛Mark D€¯ ezt Ć*rta:

Sorry yep that was silly

If B2 is than A1 then the result should be 0

"Stefi" wrote:

Think over your example!
Therefore this should return 2 What is this 2, it doesn't show up in the example.


=IF(B2<A1,min(C2,A1),"whatif B2=A1")

returns C2 if B2<A1 but A1 if C2A1 (won't exceed A1) but you didn't specify
the case B2=A1.

--
Regards!
Stefi



€˛Mark D€¯ ezt Ć*rta:

Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Think I need a MAX / MIN formula here (help needed)

"Mark D" wrote:
A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1
Therefore this should return 2


You are not being clear or consistent in your requirements. Neither C2 nor
A1 is 2. Do you mean (wild-ass guess):

=max(0, min(A1-B2,C2))


----- original message -----

"Mark D" wrote:
Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you

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 needed Sprinter Excel Discussion (Misc queries) 8 December 11th 08 05:02 PM
FORMULA NEEDED Angie Excel Worksheet Functions 13 November 3rd 08 11:05 PM
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
Formula needed - is this possible? Kelly 1st Excel Discussion (Misc queries) 2 March 28th 07 03:17 AM
help on and/or formula needed Fred Excel Discussion (Misc queries) 5 October 14th 05 03:06 PM


All times are GMT +1. The time now is 07:07 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"