Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Combine Two Formulas in Excel With IF

Excel functions are predefined formulas for frequently used calculations. The IF
function performs a logical test between two values, returning one value if the
comparison is true and another if it's false. The syntax of the IF function is IF(test,
value if true, value if false). For example, the formula =IF(C1>B1,C1-B1,0)
compares the value in cell C1 to the value in cell B1. If the value in C1 is greater
than B1, the result displayed in the cell is the difference between the values in C1
and B1. If the value in B1 is greater than C1, the displayed result is 0.

The IF function becomes even more powerful when nesting is used. The term
nesting refers to using a function as an argument to another function in a
formula. For example, the SUM and AVERAGE functions are nested within the IF
function in this formula: =IF(SUM(A2:A6)>100,SUM(A2:A6),AVERAGE(A2:A6)),
which tests whether the sum of a range of cell values is greater than 100 and
returns the sum of the values if true or the average of the values if false. Excel
allows function nesting up to 64 levels deep, which accommodates both simple
and complex calculations within a single formula.

Display Two Results as Text in Excel


If you don't mind treating the results of your calculation as text, you can use the
ampersand operator to join certain types of formulas. The ampersand operator,
like the CONCAT function, allows you to combine text in Excel. For example, the
formula =SUM(2,2)&" "&SUM(5,5) returns the text string "4 10". The space
character between the ampersands is added to the formula so that a space
appears in the result. It's important to remember that this value is text and cannot
be treated as a numerical value within any other formula.
Show Comments
People are Reading
1

How to Use an "If Then" Statement in Excel

How to Subtract Cells in Excel

How to Use Less Than or Equal to Function in Excel

YOU MAY ALSO LIKE


1

How to Enter Formulas in Excel to Show Not Less Than Zero

How to Use a Cell Value as a Reference in Excel

How to Use Minus Function in Excel

You might also like