Spreadsheet
IF function usage:
=IF ( test, then_true, otherwise_value )
Ex:
=if (7>=5, 7, 5)
Test for #N/A:
=ISERROR(INDEX(GoogleFinance(“SPY”;”close”;5/11/2013;1;1);2;2)) will return TRUE
Google Finance – Stock:
Get stock price: GoogleFinance(B2,”price”)
Get closing price on a past day:INDEX(GoogleFinance(“SPY”;”close”;DATE;1;1);2;2)
Reference:
Google Drive Functions – link
IF statement – about.com