Function macro

September 20, 2012
Function 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: The macro has three selection modes:

Single cell selection

This is when you have a single empty cell selected. In this case the macro will be applied to the cells above the selected cell:

Function Macro

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 selection

Alternative 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:

Function Macro

Function Macro

Multiple empty cells on a single column/row

If 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:

Function Macro

Function Macro

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:

Function Macro


embee - 2015-09-17
is there a way to update the computed value when the table has changed or do I have to clear the formula cell and re-create the formula?
Yevgeniy - 2013-09-19
Thank you, Omer
Omer Atay - 2013-09-18
You can change the property with Onetastic, but OneNote will still enforce a minimum width. So if you change the width to a very small number, OneNote will ignore this.

Other Posts

Show all posts

DISCLAIMER: The opinions and views expressed in this website are those of the author and do not necessarily state or reflect those of Microsoft.