logic in spreadsheet pages