Download presentation
Presentation is loading. Please wait.
1
Conditionals Belinda Kerchmar 3.1.11
2
Operators What are the operators we discussed last time? This time -- Conditional Operators: IF SUMIF COUNTIF
3
IF in the real world... IF you get 8 hours of sleep THEN you’ll feel fresh in the morning ELSE you’ll feel tired in the morning IF you’re a Carolina fan on game day THEN you’ll wear Carolina blue ELSE you will wear whatever you feel like
4
IF in excel… IF (logical_test, value_if_true, value_if_false) Logical test: the thing we’re checking for true or false Value_if_true: what should happen if our test was true? Value_if_false: what should happen if our test was false?
5
Simple IF Example… Is the number in the cell greater than seven?
6
More complicated IF example Let’s assign letter grades to the students! 90 - 100 – A 80 - 89 – B 70 - 79 – C 60 - 69 – D <60 – F
7
COUNTIF in the real world How many brunettes are in class?
8
COUNTIF in excel… COUNTIF(range, criteria) range – a collection of cells that we’re checking against our criteria range example: I2:I9 criteria some logical test for our range Criteria example: “>=60” criteria needs to be in quotes
9
COUNTIF example How many courses is each student passing? How many courses did at least one student pass?
10
SUMIF in excel SUMIF (range, criteria, sum_range) This function will add things up, depending on the criteria given. range – a range of cells ex. I2:I9 criteria – the criteria we’re checking against sum_range – the range of cells to add up
11
SUMIF example How much would it cost to buy one of every kind of vegetable? How much would it cost to buy one of every kind of fruit?
12
On your own (or in groups) Buy the grocery item if it is a fruit and if it costs less than $2.50. Label the grocery items as inexpensive ( $2) Sum up the even numbers from the list. Hint: use ISEVEN(someNumber) & ISODD(someNumber) Sum up the odd numbers from the list
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.