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
275
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)
Using an If statement in Microsoft Excel - Image 1
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.
Using an If statement in Microsoft Excel - Image 2
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)
Using an If statement in Microsoft Excel - Image 3
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)

Using an If statement in Microsoft Excel - Image 1

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.

Using an If statement in Microsoft Excel - Image 2

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

Using an If statement in Microsoft Excel - Image 3

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:
Post a Comment

Please notify me the replies via email.

Important:
  • We hope the conversations that take place on MyTechLogy.com will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
You may also be interested in
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top