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
629
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
Mukesh

on 11 June 18
Annalee

on 10 May 18
Rachana

on 10 April 18
Jessica

on 17 March 18
Robinsan

on 15 December 17