• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

if formula

I would like to find out how to write a formula and then understand what each section means.


If C7 is >0 add C7+C12+C13+C14+C15+C16; If C7 IS,0 add C8+C12+C13+C14+C15+C16.
 
Hi,

Welcome to the forum!


If you have not tried it already, please try the Custom Google Search box located in the upper right side of this window, with a search string such as "tutorial for beginners".


You will find a wealth of info, including how to construct formulas.


Enjoy learning Excel!


-Sajan.
 
Hi ,


Is it something like this ?


=IF(C7>0,C7+SUM(C12:C16),IF(C7=0,C8+SUM(C12:C16)))


Of course , the above formula does not specify what should happen if C7 is less than 0.


A similar , but not identical , outcome will also happen from the following formula :


=SUM(C12:C16)+IF(C7>0,C7,IF(C7=0,C8))


or


=SUM(C12:C16)+IF(C7>0,C7,IF(C7=0,C8,))


Narayan
 
I'm going to suggest

=SUM(C12:C16, C7, (C7=0)*C8)


This says

Sum( Range C12:C16 + C7 + If(C7=0)*C8 )

If C7 = 0 2 things happen

C7 is 0 and won't be added

if C7=0 the section (C7=0)*C8 will evaluate to True*C8 adding C8 to the equation

if C7>0 the section (C7=0)*C8 will evaluate to False*C8 not adding C8 to the equation
 
drewszone32

Please see the details below for learning IF condition. I think it will help you.


The Excel IF function checks to see if a certain condition is true or false. If the condition is true, the function will do one thing, if the condition is false, the function will do something else.

Syntax: =IF(logical_test, value_if_true, value_if_false)


logical_test : The first argument is what you want to test for. For example, is the number in the cell F10 greater than 50?

value_if_true : This is what you want to do if the answer to the first argument is YES

value_if_false : This is what you want to do if the answer to the first argument is NO


Example: Check the number in the cell F10 greater than 50 or not.

If cell value is greater than 50 then show “yes greater than 50”

If cell value is not greater than 50 then show “not greater than 50”

Look, in this example, we have to do three step works.


Firstly, check is the value greater than 50?

Secondly, if answer is YES (TRUE) >>>>> show “yes greater than 50”

Thirdly, if answer is NO (FALSE) >>>>> show “not greater than 50”

=IF(F10>50,"yes greater than 50","not greater than 50")

Answer is “not greater than 50” because the value in F10 is 15 that is FALSE


Regards

Muneer
 
Back
Top