Macros using Scripts:
. We can write Macros in Google Sheets by writing scripts.. Consider in a row, Age needs to be incremented or decremented by using a symbol.
> Script Editor
. For this, we need to write script.
> Select Tools> Script Editor
. In the script editor, create a function to increase and decrease values.
. Now to insert a symbol:
> Select Insert
> Drawing
> Choose Shapes and draw.
. Now assign the script code to the drawn element:
> Right Click on drawn element
> Choose Assign Script
> Mention the name as written in script.
. We get the output which increases and decreases the age as we click on elements.
. Google Sheet allows to make a option button/ checkbox/ drop-down list with the help of Data Validation.
Example:
We can assign a drop-down to select a City.
> Select the cell where you want to insert drop-down
> Go to Data
> Data Validation
. Now a window appears, select Cell range.
. In Criteria, select List of items.
. Now, assign the values you want to see in the list.
. Finally, we can select any of the items present in the list.