Page 171 - IT_V1.0_Class10
P. 171
Step 7: Click the Close button to close the code window.
7
6
5
Step 8: Type the function =DisplayData() in any cell in the sheet and press the Enter key.
Then, you will see the text Hello World!!! displayed automatically in a cell as shown below:
8
Comparison of Predefined Functions and Macros in Spreadsheet Applications
In spreadsheet applications like LibreOffice Calc, both predefined functions and macros serve as tools to enhance
productivity. While both can automate tasks, they differ significantly in terms of their purpose, complexity, and
customisation options. Predefined functions are built-in formulas that handle common calculations, whereas
macros allow users to automate complex, repetitive tasks by recording or writing custom scripts.
Below is a comparison between the two in terms of various characteristics:
Aspect Predefined Function in Calc Macros as a Function
Predefined functions are built-in functions Macros are user-defined sequences of
Definition
provided by Calc, like SUM, AVERAGE, and IF. commands or instructions to automate tasks.
Used to perform common calculations Used to automate repetitive tasks or complex
Purpose
automatically in cells. procedures.
Requires programming or scripting
Ease of Use Simple to use; just enter the function in a cell.
knowledge to create and execute.
Automatically executed when entered into a Executed when manually triggered or
Execution
cell. assigned to a button or shortcut.
Automating data entry, formatting, or
Examples SUM, AVERAGE, COUNTIF, VLOOKUP, etc.
creating custom tools.
Reusable across multiple sheets or workbooks Can be reused across different documents if
Recording
with proper references. saved as a template or module.
Dependent on user-defined scripting and the
Dependency Dependent on Calc’s built-in functionality.
macro environment.
Using Macros in Spreadsheet 169

