Sep 20Function macro under Table category is one of the very complicated macros I authored for Onetastic. It provides functionality similar to Excel functions, and it supports the following functions, as you will see when you launch it:
- Count non-empty
- Count numbers
Single cell selectionThis is when you have a single empty cell selected. In this case the macro will be applied to the cells above the selected cell:
Here the cursor is on the Total row and Flights column. If you run Function macro and select Sum as the function, you will get the total number of flights in the cell.
Single column/row selectionAlternative to the above selection method, you can select a whole column (or a row) where the last cell is empty and you will achieve the same result as above. This allows applying the function if you have your data in a row rather than column, or otherwise it does the same as the single selection mode. Both of the following will fill in the total days in space:
Multiple empty cells on a single column/rowIf you want to apply the function to multiple columns/rows at the same time, you can select multiple cells on the same row or column. Running the macro with following selection will fill in all selected cells:
If your selection is not one of the above (e.g. you select cells from multiple columns and rows, you select cells from more than one table, you don't have any selection under a table, etc.), you will see some error message like: