If, Ands and Buts of Excel Adam Little 3/10/2018 [website]
Formulas of Excel Decrease the amount of time you spend in Excel Increase the accuracy of your data and your reports
Basic Math ADD: can use ‘+’ or SUM(number1, number2, …) Allows you to add 2 or more numbers together Can use cell references and arrays SUBTRACT: use ‘–’ MULTIPY: can use ‘*’ or PRODUCT(number1, number2, …) Allows you to multiply 2 or more numbers together DIVIDE: use ‘/’
Basic Math Question answers Total Bananas bought: 7 Total fruit bought: 27 Total of apples and peaches: 13 Total cost of apples: $2.40 Brought $20, how much change: $10.05
COUNT(value1, value2, …) Returns the number of cells that have numbers in them Value can be items, cell references, or ranges
COUNT(value1, value2, …) Result Number: 4
COUNTA(value1, value2, …) Returns the number of cells containing numbers, text, formulas/functions, and empty text (““) Does not count empty cells
COUNTA(value1, value2, …) Result Number: 9
AVERAGE(value1, value2, …) Returns the average of a group of supplied numbers Excel adds the numbers together and divides by the total number of numbers The function will automatically ignore empty cells
AVERAGE(value1, value2, …) Results Abe: 78.8 Debora: 78.8 Johnette: 67.25 Layla: 71.4 Renna: 68.8 Tiny: 62.75
MIN(array) MAX(array) MIN returns the smallest value from a set of data Ignores empty cells MAX returns the largest value from a set of data
MIN(array) MAX(array) Results MIN: 35 MAX: 98
IF(logical_test, value_if_true, value_if_false) To test for or evaluate certain conditions and then react differently depending on whether the test was TRUE or FALSE
IF(logical_test, value_if_true, value_if_false) Results Alanna: FAIL Brittany: FAIL Klara: PASS Mozelle: PASS Tiny: PASS Results Blythe: F Darin: B Jule: D Mitch: C Yee: A
Nested IF statements Refers to using more than one IF function so that you can test for more conditions and return more possible results
Nested IF statements Results Blythe: F Darin: B Jule: D Mitch: C Yee: A
NOW( ) TODAY( ) NOW – returns the current date and time TODAY – returns the current date Takes no parameters, but requires empty parentheses Will continually update each time the worksheet is refreshed (a value is entered or updated) F9 will force the sheet to recalculate and update the value
NOW( ) TODAY( ) NOW results TODAY results 1: =NOW( ) 2: =NOW( ) + 7
MONTH(date) DAY(date) YEAR(date) MONTH – get the month as a number (1-12) from a date DAY – get the day as a number (1-31) from a date YEAR – get the year from a date
AND(logical1, [logical2], …) OR(logical1, [logical2], …) AND – test multiple conditions at the same time Returns true if ALL arguments are true OR – test multiple conditions Returns true if ANY argument is true
AND(logical1, [logical2], …) OR(logical1, [logical2], …) AND results 76: TRUE 81: TRUE 78: TRUE 90: FALSE 85: TRUE 100: FALSE
AND(logical1, [logical2], …) OR(logical1, [logical2], …) OR results Red: TRUE Blue: FALSE Green: TRUE
WORKDAY(start_date, days, [holidays]) Returns the “nearest” working day in the past or future Calculate due date, delivery date, etc that exclude non-working days Positive days = future date; Negative days = past date IMPORTANT: this function does not include the start date when calculating the end date
WORKDAY(start_date, days, [holidays]) Results Monday, January 23, 2017 Wednesday, January 2, 2019 Monday, January 8, 2018
NETWORKDAYS(start_date, end_date, [holidays]) Returns the number of working days between two dates Excludes Saturdays and Sundays and optional holidays IMPORTANT: this function does include the both start and end date when calculating the work days
NETWORKDAYS(start_date, end_date, [holidays]) Results 254 5 4
DATEDIF(start_date, end_date, unit) Returns the time between two dates in months, days, or years Units are days, months, or year “D”, “M”, “Y” DATEDIF is known as a “compatibility” function Works in all versions of Excel, but doesn’t have a help menu “DATEDIF is treated as the drunk cousin of the Formula family. Excel knows it lives a happy and useful life, but will not speak of it in polite conversation.” –Chip Pearson; exceljet.net
DATEDIF(start_date, end_date, unit) Results 2 24 731