ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Function not working as I want (https://www.excelbanter.com/excel-worksheet-functions/445627-if-function-not-working-i-want.html)

FooFighter616

IF Function not working as I want
 
Hello,

So basically I have a spreadsheet with a lot of information on and I need to use an IF function to get a value for certain cells only. This is what I have got so far.

=IF(L182<2400,"=$M$180*H181/$B$255","0")

So L182 is the key cell. If this cell is between 0 and 2400 then it should be true, if not it should be false)

The true value I want to be this formula "=$M$180*H181/$B$255)"

M180 is just a value (8 in this case)

H181 is another value. I want this to change as I drag it down to 182, 183 etc but it is currently just staying as H181.

B255 is another value that has been generate using a SUMIF function using the same criteria as this IF function.

Any suggestions how I can make this work?

Spencer101

Quote:

Originally Posted by FooFighter616 (Post 1600278)
Hello,

So basically I have a spreadsheet with a lot of information on and I need to use an IF function to get a value for certain cells only. This is what I have got so far.

=IF(L182<2400,"=$M$180*H181/$B$255","0")

So L182 is the key cell. If this cell is between 0 and 2400 then it should be true, if not it should be false)

The true value I want to be this formula "=$M$180*H181/$B$255)"

M180 is just a value (8 in this case)

H181 is another value. I want this to change as I drag it down to 182, 183 etc but it is currently just staying as H181.

B255 is another value that has been generate using a SUMIF function using the same criteria as this IF function.

Any suggestions how I can make this work?

Try getting rid of the quote marks and the equals in the middle of the formula.

Claus Busch

IF Function not working as I want
 
Hello,

Am Fri, 30 Mar 2012 15:40:08 +0000 schrieb FooFighter616:

=IF(L182<2400,"=$M$180*H181/$B$255","0")


try:
=IF(L182<2400,$M$180*H181/$B$255,0)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

FooFighter616

Quote:

Originally Posted by Claus Busch (Post 1600298)
Hello,

Am Fri, 30 Mar 2012 15:40:08 +0000 schrieb FooFighter616:

=IF(L182<2400,"=$M$180*H181/$B$255","0")


try:
=IF(L182<2400,$M$180*H181/$B$255,0)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Thank you!!!

Claus Busch

Cutting out a process
 
Hi,

Am Mon, 2 Apr 2012 09:37:01 +0000 schrieb FooFighter616:

Continuing on from this however, I now need to cut out a process.
Currently I have this formula "=IF(L181<2400,$M$180*H181/$B$255,0)". The
cell B255 contains the formula
"=SUMIF(L$181:L$234,"<2400",$H$181:$H$234)".

Basically, I want to cut out the cell B255 and have the whole thing in
one formula. Is this possible and how would I do this?


you have to replace $B$255 in the first formula with the formula into
B255:
=IF(L181<2400,$M$180*H181/SUMIF(L$181:L$234,"<2400",$H$181:$H$234),0)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


All times are GMT +1. The time now is 04:51 AM.

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