AGB 260: AGRIBUSINESS INFORMATION TECHNOLOGY BASIC OPERATORS AND FUNCTIONS
USEFUL CHAPTERS IN THE TEXTBOOK REGARDING THIS LECTURE CHAPTER 10: INTRODUCING FORMULAS AND FUNCTIONS CHAPTER 11: CREATING FORMULAS THAT MANIPULATE TEXT CHAPTER 12: WORKING WITH DATES AND TIMES CHAPTER 13: CREATING FORMULAS THAT COUNT AND SUM MANY OF THE OTHER FUNCTIONS IN THIS CHAPTER ARE SCATTERED THROUGHOUT THE BOOK.
FORMULAS IN EXCEL AND BASIC OPERATORS WHENEVER YOU ARE STARTING A FUNCTION OR A FORMULA IN EXCEL BY TYPING IT EITHER INTO THE FORMULA BAR OR DIRECTLY INTO THE CELL, YOU NEED TO PUT =, -, OR + SIGN IN FRONT OF IT. WHILE YOU CAN USE ANY OF THE THREE SIGNS, IT IS RECOMMENDED THAT YOU USE THE =.
FORMULAS IN EXCEL AND BASIC OPERATORS CONT. BASIC OPERATORS IN EXCEL: LOGICAL: =, >, =, MATHEMATICAL OPERATORS: +, -,*,/, ^ (FOR EXPONENTS), CONCATENATION OPERATOR: &
OPERATOR PRECEDENCE ( ) ANYTHING IN PARENTHESIS IS EVALUATED FIRST *, / +, - & =, >, =, >=
FORMULA EXAMPLES =1+2+3, =5*(4/2), =10^10 =1=1, =(1=1)*5, =1=1*5 =5&5, =A&2, =“A”&2 =A1+A2, +A$1+$B$1
BASIC FUNCTIONS IN EXCEL A FUNCTION IN EXCEL IS A PREPROGRAMMED FORMULA THAT CONTAINS A SET OF ARGUMENTS A FUNCTION CAN HAVE NO ARGUMENTS, E.G., =RAND() ONE ARGUMENT, E.G., =SQRT(VALUE) A FIXED NUMBER OF ARGUMENTS, E.G., =IF(CONDITION,TRUE,FALSE)
BASIC FUNCTIONS IN EXCEL CONT. AN INDETERMINATE NUMBER OF ARGUMENTS E.G., =SUM(VALUE 1, VALUE 2, …) AND/OR OPTIONAL ARGUMENTS E.G., =PMT(RATE,NPER,PV,[FV],[TYPE]. ARGUMENTS ARE TYPICALLY SEPARATED BY COMMAS. WHENEVER AN ARGUMENT IS OPTIONAL, IT IS PLACED IN BRACKETS.
QUICK NOTE ON ARGUMENTS USING COLON (:) SUPPOSE YOU HAD THE FOLLOWING FUNCTION: =SUM(A1,A2,A3,A4,A5) ANOTHER WAY OF WRITING THIS IS TO PUT: =SUM(A1:A5) PUTTING A COLON BETWEEN A1 AND A5 TELLS EXCEL TO USE CELLS A1 THROUGH A5. A1:A5 IS KNOWN AS A RANGE OF CELLS.
QUICK NOTE ON ARGUMENTS USING COLON (:) CONT. SUPPOSE YOU HAD THE FOLLOWING FUNCTION: =AVERAGE(A1,A2,B1,B2) ANOTHER WAY OF WRITING THIS IS TO PUT: =AVERAGE(A1:B2)
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS =COUNT(VALUE1,[VALUE2],…) THIS COUNTS THE NUMBER OF CELLS IN A RANGE THAT ARE NUMBERS. =COUNTA(VALUE1,[VALUE2],…) THIS COUNTS THE NUMBER OF CELLS IN A RANGE THAT ARE NOT EMPTY. =COUNTBLANK(VALUE1,[VALUE2],…) THIS COUNTS THE NUMBER OF CELLS IN A RANGE THAT ARE EMPTY.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =SUM(VALUE1,[VALUE2],…) ADDS ALL THE NUMBERS IN A RANGE OF CELLS. =SUMPRODUCT(ARRAY1,[ARRAY2],[ARRAY3],…) RETURNS THE SUM OF THE PRODUCTS. AN ARRAY IS A GROUPING; IN THIS CASE A SET OF NUMBERS
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =MAX(NUMBER1,[NUMBER2],…) GIVES YOU THE LARGEST NUMBER IN A RANGE OF NUMBERS WHILE IGNORING LOGICAL VALUES AND TEXT. =LARGE(ARRAY,K) PROVIDES THE K-TH LARGEST VALUE IN A DATASET WHICH CAN BE KNOWN AS AN ARRAY.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =MIN(NUMBER1,[NUMBER2],…) GIVES YOU THE SMALLEST NUMBER IN A RANGE OF NUMBERS WHILE IGNORING LOGICAL VALUES AND TEXT. =SMALL(ARRAY,K) PROVIDES THE K-TH SMALLEST VALUE IN A DATASET WHICH CAN BE KNOWN AS AN ARRAY.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =RANK.AVG(NUMBER,REF,[ORDER]) GIVES YOU THE RANKING OF A NUMBER FROM A SET OF REFERENCE NUMBERS WHERE IF TWO OR MORE NUMBERS TIE THEN IT WILL AVERAGE THEIR RANKINGS. ORDER IS AN OPTIONAL ARGUMENT SET TO 0 IF YOU WANT THE RANKING IN TERMS OF DESCENDING ORDER AND 1 IF YOU WANT THE ASCENDING ORDER.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =RANK.EQ(NUMBER,REF,[ORDER]) GIVES YOU THE RANKING OF A NUMBER FROM A SET OF REFERENCE NUMBERS WHERE IF TWO OR MORE NUMBERS TIE THEN IT WILL GIVE THEM THE SAME RANKING. ORDER IS AN OPTIONAL ARGUMENT. =RANK(NUMBER,REF,[ORDER]) THIS IS A BACKWARDS COMPATIBLE FUNCTION FOR EXCEL 2007 AND BEFORE AND WORKS LIKE =RANK.EQ(NUMBER,REF,[ORDER]).
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =AVERAGE(VALUE1,[VALUE2],…) GIVES THE AVERAGE OF THE RANGE OF CELLS. =MEDIAN(VALUE1,[VALUE2],…) GIVES THE MEDIAN OF THE RANGE OF CELLS.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =SQRT(NUMBER) RETURNS THE SQUARE ROOT OF A NUMBER. =CONCATENATE(TEXT1,[TEXT2],…) JOINS TEXT STRINGS TOGETHER. YOU CAN USE & IN MUCH THE SAME WAY.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =TODAY() RETURNS THE CURRENT DATE. =DAY(SERIAL_NUMBER) RETURNS THE DAY OF THE MONTH FROM A GIVEN DATE. =MONTH(SERIAL_NUMBER) RETURNS THE MONTH FROM A GIVEN DATE IN TERMS OF A NUMBER FROM 1 TO 12.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =YEAR(SERIAL_NUMBER) RETURNS THE YEAR FROM A GIVEN DATE. =DATE(YEAR,MONTH,DAY) RETURNS THE NUMBER THAT REPRESENTS A GIVEN DATE.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =WEEKDAY(SERIAL_NUMBER,[RETURN_TYPE]) THIS RETURNS A NUMBER FOR THE DAY OF THE WEEK, WHICH CAN BE CUSTOMIZED FOR WHAT THE NUMBER MEANS, E.G., 1=SUNDAY, 2 =MONDAY, ETC. =NETWORKDAYS(START_DATE,END_DATE,[HOLIDAYS]) PROVIDES YOU WITH THE NUMBER OF WORKDAYS BETWEEN TO DATES WITH THE ABILITY TO CUSTOMIZE THE HOLIDAYS.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =CHOOSE(INDEX_NUM,VALUE1,[VALUE2]) CHOOSES A VALUE OR ACTION TO PERFORM FROM A LIST OF VALUES WHICH IS BASED ON AN INDEX NUMBER. =MOD(NUMBER,DIVISOR) RETURNS THE REMAINDER FROM DIVIDING A NUMBER BY A DIVISOR. HOW COULD THIS BE USEFUL TO YOU?
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =ROUND(NUMBER,NUM_DIGITS) ROUNDS A NUMBER TO A SPECIFIED NUMBER OF DIGITS. =ROUNDUP(NUMBER,NUM_DIGITS) ROUNDS A NUMBER TO A SPECIFIED NUMBER OF DIGITS AWAY FROM ZERO. =ROUNDDOWN(NUMBER,NUM_DIGITS) ROUNDS A NUMBER TO A SPECIFIED NUMBER OF DIGITS TOWARDS ZERO.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =LEN(TEXT) THIS COUNTS THE NUMBER OF CHARACTERS IN A TEXT STRING. =LEFT(TEXT,[NUM_CHARS]) RETURNS A DESIGNATED NUMBER OF CHARACTERS FROM THE BEGINNING OF A TEXT STRING, WITH THE DEFAULT BEING ONE. =RIGHT(TEXT,[NUM_CHARS]) RETURNS A DESIGNATED NUMBER OF CHARACTERS FROM THE END OF A TEXT STRING, WITH THE DEFAULT BEING ONE.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =VALUE(TEXT) CHANGES TEXT TO A NUMBER VALUE. =TEXT(VALUE,[FORMAT_TEXT]) THIS TAKES A VALUE AND FORMATS IN A PARTICULAR STYLE OF TEXT.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. =ROW([REFERENCE]) RETURNS THE ROW NUMBER OF A DESIGNATED CELL. IF IT IS LEFT EMPTY, THEN IT GIVES THE ROW NUMBER THAT THE FORMULA IS IN. =COLUMN([REFERENCE]) RETURNS THE COLUMN NUMBER OF A DESIGNATED CELL. IF IT IS LEFT EMPTY, THEN IT GIVES THE ROW NUMBER THAT THE FORMULA IS IN.
USEFUL FUNCTIONS FOR INITIAL DATA ANALYSIS CONT. ADDRESS(ROW_NUM,COLUMN_NUM,[ABS_NUM], [A1],[SHEET_TEXT]) RETURNS THE CELL REFERENCE FOR ANY GIVEN COLUMN AND ROW NUMBERS.
INVESTIGATE FUNCTIONS USING CARRIER SURVEY OPEN CARRIERSURVEY CLASSEXAMPLE.XLSX IN CLASS WE WILL WORK THROUGH EXAMINING THIS SURVEY USING THE FUNCTIONS DISCUSSED ABOVE.