ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help with a formula (https://www.excelbanter.com/excel-worksheet-functions/39582-help-formula.html)

Adam

Help with a formula
 
=IF(B7=50000000,$B24*$D24+$B25*$D25+((B7-$D26)*$B26),IF(COUNTIF(B7,"b7$D24,b7<$D26"),$B24* 40000000+((B7-40000000)*$B25),IF(B7<40000000,$B24*B7,0)))

The issue I'm having with this formula is the greater than x but less than y
if statement. For some reason it won't recognize it. I tried the countif
formula, but no luck. Anyone know how to fix this?

Anne Troy

Try this:
=IF(B7=50000000,$B24*$D24+$B25*$D25+((B7-$D26)*$B26),IF(OR(countif(b7,"$D24"),countif(b7," <$D26")),$B24*40000000+((B7-40000000)*$B25),IF(B7<40000000,$B24*B7,0)))
************
Anne Troy
www.OfficeArticles.com

"Adam" wrote in message
...
=IF(B7=50000000,$B24*$D24+$B25*$D25+((B7-$D26)*$B26),IF(COUNTIF(B7,"b7$D24,b7<$D26"),$B24* 40000000+((B7-40000000)*$B25),IF(B7<40000000,$B24*B7,0)))

The issue I'm having with this formula is the greater than x but less than
y
if statement. For some reason it won't recognize it. I tried the countif
formula, but no luck. Anyone know how to fix this?




Adam

I actually got it with an AND function like this:

=IF(M7$D26,$B24*$D24+$B25*$D25+((M7-$D26)*$B26),IF(AND($D24<M7,M7<$D26),$B24*$D24+((M7-$D24)*$B25),IF(M7<$D24,$B24*M7,0)))

"Anne Troy" wrote:

Try this:
=IF(B7=50000000,$B24*$D24+$B25*$D25+((B7-$D26)*$B26),IF(OR(countif(b7,"$D24"),countif(b7," <$D26")),$B24*40000000+((B7-40000000)*$B25),IF(B7<40000000,$B24*B7,0)))
************
Anne Troy
www.OfficeArticles.com

"Adam" wrote in message
...
=IF(B7=50000000,$B24*$D24+$B25*$D25+((B7-$D26)*$B26),IF(COUNTIF(B7,"b7$D24,b7<$D26"),$B24* 40000000+((B7-40000000)*$B25),IF(B7<40000000,$B24*B7,0)))

The issue I'm having with this formula is the greater than x but less than
y
if statement. For some reason it won't recognize it. I tried the countif
formula, but no luck. Anyone know how to fix this?






All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com