400 likes | 568 Views
Spreadsheet Functions. Functions. Simple functions Array functions IF - logical functions. Function notation. A function is a piece of computation that takes 1 or more arguments (data) and returns a value Function( arg1, arg2, arg3 ) Sine(90) Max(100,200,120,-7) Sqrt( min(7+4, 9) ).
E N D
Functions • Simple functions • Array functions • IF - logical functions
Function notation • A function is a piece of computation that takes 1 or more arguments (data) and returns a value • Function( arg1, arg2, arg3 ) • Sine(90) • Max(100,200,120,-7) • Sqrt( min(7+4, 9) )
Functions • Simple functions • Array functions • IF - logical functions
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Sum program Sum=0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R, C]; } }
Count program Count=0; for (each row R) { for (each column C in row R) { Count=Count+1; } }
Average program Sum=0; Count = 0; for (each row R) { for (each column C in row R) { Sum=Sum+Sheet[R,C]; Count = Count+1; } } Average = Sum/Count;
Other array functions • Min • Max • Stdev - standard deviation • Median • Product - multiply them all together
Functions • Simple functions • Array functions • IF - logical functions
If • If ( test, trueVal, falseVal)
Review • Functions - name with arguments • Finding functions • Array functions • Sum(B6:D32) • Average(F14:R75) • IF - AND - OR