MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.

I'm not curious

# Using an If statement in Microsoft Excel

Published on 27 February 14
332
0
2
Ever wondered the C Programming conditional statement "IF" can be used in Excel, Yes it can be used in the same syntax.

The syntax:

= IF(Enter Condition, What to display if the condition is true, What to display if the condition is false)
Example: You have two columns with the person and their age, you have to find out the count of people with age less than 30.
if(B2<30,1,0)

Condition: B2<30 ( since the requirement is less than 30, if it less than or equal to use <=30)
Condition passes : 1 (it displays 1)
Condition Fails: 0 (it displays 0)
Sum of the result value in Column C is the final count which you are looking for.

The formula can come handy when you have hundreds of thousands of records.

Note: The calculation is much faster than the generic SUMIF() function.

Ever wondered the C Programming conditional statement "IF" can be used in Excel, Yes it can be used in the same syntax.

The syntax:

= IF(Enter Condition, What to display if the condition is true, What to display if the condition is false)

Example: You have two columns with the person and their age, you have to find out the count of people with age less than 30.

if(B2
Condition: B2Condition passes : 1 (it displays 1)
Condition Fails: 0 (it displays 0)

Sum of the result value in Column C is the final count which you are looking for.

The formula can come handy when you have hundreds of thousands of records.

Note: The calculation is much faster than the generic SUMIF() function.

This blog is listed under Development & Implementations and Data & Information Management Community

Related Posts:

## Microsoft Excel

You may also be interested in
Ritesh

on 03 February 17
Venkatesh guptha

on 17 January 17
Annalee

on 27 October 16
Dana

on 08 December 15
Sarah

on 04 November 15