Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Ranging foruma in excel

I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Ranging foruma in excel

=IF(A1<=B1,0,IF(A1<C1,C1-B1,C1))
--
David Biddulph

"Mark Scott" wrote in message
...
I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Ranging foruma in excel

Thanks David, making it harder than it should have been :)

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=IF(A1<=B1,0,IF(A1<C1,C1-B1,C1))
--
David Biddulph

"Mark Scott" wrote in message
...
I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Ranging foruma in excel

=IF(A1<=B1,0,IF(AND(A1B1,A1<C1),C1-B1,C1))


"Mark Scott" wrote:

I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Ranging foruma in excel

Yes, but bear in mind that you don't need the AND(A1B1, )
as we've already trapped the cases where A1<=B1 .
--
David Biddulph

"Teethless mama" wrote in message
...
=IF(A1<=B1,0,IF(AND(A1B1,A1<C1),C1-B1,C1))


"Mark Scott" wrote:

I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Ranging foruma in excel

Just another possibility:

=(C1-B1*(A1<C1))*(A1B1)

In article ,
"David Biddulph" <groups [at] biddulph.org.uk wrote:

Yes, but bear in mind that you don't need the AND(A1B1, )
as we've already trapped the cases where A1<=B1 .
--
David Biddulph

"Teethless mama" wrote in message
...
=IF(A1<=B1,0,IF(AND(A1B1,A1<C1),C1-B1,C1))


"Mark Scott" wrote:

I am looking for a function which does the following:

if value A is equal to or less than value B then return 0
if Value A greater than value B but less than value C then return the
difference C-B
if Value A greater than or equal to value C then return value C

I have tried using IF statements but they are not returning the values
correctly

Please can someone advise? using XL 2K7

Regards

Mark

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



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