A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF statement that yields a value based on a formula



 
 
Thread Tools Display Modes
  #1  
Old February 11th, 2010, 04:59 PM posted to microsoft.public.excel.worksheet.functions
Barbara H
external usenet poster
 
Posts: 3
Default IF statement that yields a value based on a formula

Help! If cell B12 = 0, then I need the answer to be calculated based on the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h
  #2  
Old February 11th, 2010, 05:14 PM posted to microsoft.public.excel.worksheet.functions
Eva
external usenet poster
 
Posts: 316
Default IF statement that yields a value based on a formula

IF(B12=0,B12*0.4,IF(B12,0,0))
Click yes if helped
--
Greatly appreciated
Eva


"barbara h" wrote:

Help! If cell B12 = 0, then I need the answer to be calculated based on the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h

  #3  
Old February 11th, 2010, 05:15 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default IF statement that yields a value based on a formula

Hi,

Try this

=MAX(0,B12*0.4)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"barbara h" wrote:

Help! If cell B12 = 0, then I need the answer to be calculated based on the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h

  #4  
Old February 11th, 2010, 05:19 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default IF statement that yields a value based on a formula

One way...

=(B12=0)*0.4

--
Biff
Microsoft Excel MVP


"barbara h" wrote in message
...
Help! If cell B12 = 0, then I need the answer to be calculated based on
the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h



  #5  
Old February 11th, 2010, 05:42 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default IF statement that yields a value based on a formula

based on the formual "B12 * .40".
=(B12=0)*0.4


Ooops!

Disregard that formula.

Here's a corrected version:

=(B120)*(B12*0.4)

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
One way...

=(B12=0)*0.4

--
Biff
Microsoft Excel MVP


"barbara h" wrote in message
...
Help! If cell B12 = 0, then I need the answer to be calculated based on
the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h





  #6  
Old February 11th, 2010, 06:16 PM posted to microsoft.public.excel.worksheet.functions
Neil Humphries[_2_]
external usenet poster
 
Posts: 6
Default IF statement that yields a value based on a formula

Is the second IF really needed? Would not IF(B12=0,B12*0.4,0) solve the
problem more simply?

Also, since 0*0.4 = 0 it could be simplified to IF(B120,B12*0.4,0).

If the test only occurs a few times there won't be a noticable difference,
but if the test happens hundreds of times then the last formula will be
faster.



"Eva" wrote:

IF(B12=0,B12*0.4,IF(B12,0,0))
Click yes if helped
--
Greatly appreciated
Eva


"barbara h" wrote:

Help! If cell B12 = 0, then I need the answer to be calculated based on the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h

  #7  
Old February 11th, 2010, 07:01 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default IF statement that yields a value based on a formula

Neil,

You don't need an IF statement at all, have a look at other responses
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Neil Humphries" wrote:

Is the second IF really needed? Would not IF(B12=0,B12*0.4,0) solve the
problem more simply?

Also, since 0*0.4 = 0 it could be simplified to IF(B120,B12*0.4,0).

If the test only occurs a few times there won't be a noticable difference,
but if the test happens hundreds of times then the last formula will be
faster.



"Eva" wrote:

IF(B12=0,B12*0.4,IF(B12,0,0))
Click yes if helped
--
Greatly appreciated
Eva


"barbara h" wrote:

Help! If cell B12 = 0, then I need the answer to be calculated based on the
formual "B12 * .40". If cell B12 0, then the answer is zero.

How do I do this?
--
barbara h

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.