Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
497 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | OfficeScripts (21 exercises) |
Topic ==> | Variables (1 exercise) |
Level ==> | Average difficulty |
Subject ==> | Office Scripts training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Open the Dinosaurs.xlsx file and create a new script. The aim of the exercise is to find information on the Dino List sheet using the name entered on the Search sheet.
Use the drop down list to avoid misspelling the dinosaur names!
Create variables to hold each of the worksheets in the workbook.
Create a new variable to store the name of the dinosaur selected on the Search sheet. Use either the getText method, or the getValue method with a type cast to make sure you capture the value as a string.
Create a variable to hold the range of cells containing dinosaur names on the Dino List sheet.
The list begins in cell A2.
Use the find method to search for the selected dinosaur name in the search range. Capture the result of the find method in another variable.
Remember that the find method requires two arguments, the second of which is written in a set of braces, or curly brackets.
Use the getOffsetRange method to capture the length and height in metres of the selected dinosaur in separate variables. Use a type cast to make sure the values are stored as numbers.
Declare a constant to hold the value 3.2808 (the number of feet in a metre).
Multiply the length and height of the dinosaur in metres by the value of the constant and store the results in separate variables.
Write the value of each length and height variable into the appropriate cell on the Search sheet.
Test that your script works, then save and close both it and the workbook.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.