Professional Documents
Culture Documents
Page 1 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
To achieve this result, you need to enter a correct Excel cell formula in D5 that calculates the
percentage of employees that have tertiary education. The formula will be copied and pasted into D6
to D19. The correct values of the cells are shown in the previous screen dump on page 1.
Write
your
answer
here
You dont
need to
write
anything
in these
cells
Page 2 of 10
Your
answer
will be
copied
and
pasted
into
these
cells
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
The formula is
entered here
The logic is: if you have enough money to cover the cost of the dream car purchase plus 3 years of
parking fee and your partner is happy with that, then you will purchase the dream car.
Using this information, what is the formula of cell D8? It should show either TRUE or FALSE as the
output. Please write the formula in the box below.
Nested IF Question
Q3)
A numeric movie rating (a number in the range 0-100) is stored in B3. In cell B4 a corresponding
letter rating will be automatically given to the movie, as follows:
From 0 to 64 earns a C rating
From 65 to 84 earns a B rating
From 85 to 94 earns an A rating
From 95 to 100 earns an S rating
The result looks like this:
What is the formula in cell B4? Use nested IF functions to write the formula in the box below.
Page 3 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
Your formula needs to produce the same result shown in the screen dump (on the next page).
Here are some cell functions you may need for your answers.
ROW()
COLUMN()
MOD()
Ctrl `
Page 4 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
The conditional
formatting is applied
to A4:H11 only
There is only one conditional formatting rule in this Excel worksheet. The rule changes the
background colour of some of the cells to black. It is applied to every cell in A4:H11 only.
What is the formula of the conditional formatting rule? Write your answer in the box below.
The conditional
formatting is applied
to A4:H11 only
There is only one conditional formatting rule in this Excel worksheet. The rule changes the
background colour of some of the cells to black. It is applied to every cell in A4:H11 only.
What is the formula of the conditional formatting rule? Write your answer in the box below.
Page 5 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
VLOOKUP Questions
Q5)
A flight information checker system has been created in a worksheet called Checker. To use the
worksheet, you can enter the country and city of the flight destination to check the distance and time
required for any flights departing Hong Kong. The worksheet is shown below:
In the worksheet shown above the country and city of the destination are entered in cell C6 and C8
respectively. The unit of display for the distance travelled is entered in cell C10. If these inputs are
entered correctly, the flight distance and time will be displayed accordingly.
The flight information is stored in another worksheet, called Information, as shown here:
...
Each row contains the information of a flight departing from Hong Kong and arriving at a particular
destination city. Column D is the distance travelled in miles, Column E is the distance travelled in
kilometers and column F is the duration of the flight.
Page 6 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
Part A)
In cell C8 of the Checker worksheet, the cell will be highlighted using a yellow background if the
city entered in cell C8 is NOT in the country which has already been entered in cell C6. For
example, if you enter USA in cell C6 and then Shanghai in cell C8, cell C8 will be highlighted
with yellow, as shown below, because Shanghai is not in USA.
If you enter correct information such as China and Shanghai cell C8 will not be highlighted. To
do this, a new conditional formatting rule is set up for cell C8:
The formula in the rule will be created using a combination of the ISNA and VLOOKUP functions.
Your task is to fill in the four parameters in the VLOOKUP function shown below so that the
conditional formatting rule works as described above:
=ISNA(VLOOKUP( _____________________________________________ ,
_____________________________________________ ,
_____________________ , _______________________ )
Page 7 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
Part B)
After entering the correct country and city the flight information will be displayed in cell D16 and
cell D18. The flight distance in cell D16 is displayed using either miles or kilometers, depending on
the value in cell C10. For example, here is the information of the flight going to Sydney, which is
stored in the Information worksheet, and the display of the flight information:
You need to use a VLOOKUP function in cell D16 to show the correct distance. Please fill in the
parameters of the VLOOKUP function in the space below.
Hint: you may need to use another formula function in one of the parameters.
= VLOOKUP( _____________________________________________ ,
_____________________________________________ ,
_____________________________________________ , FALSE )
Q6)
There are five different formulas listed below. We assume that in the worksheet the value in cell A1
can be found in one of the cells in column C and the values in column C are sorted in ascending
order. Based on these assumptions, four of the formulas will produce the same result and one of them
will produce a different result.
These formulas are not copied and pasted and they are not located anywhere within column A to
column G. Which one will produce a different result?
A)
B)
C)
D)
E)
Answer:
The formula that will produce a different result is (A/B/C/D/E): _____________
Page 8 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
VBA If Question
Q7)
Assume there is a cell with name WishOfPeter and another cell with name FinalResult.
We have the following VBA code in the workbook.
What will be shown in the cell called FinalResult if we enter notebook in the cell called
WishOfPeter and then press the Enter key?
A)
B)
C)
D)
E)
sexy ladies
xbox
COMP 1022Q course textbook
notebook for taking notes
fresh air
Answer:
The text shown in FinalResult is (A/B/C/D/E): ___________________
Page 9 of 10
(COMP1022Q)[2013](f)midterm_review_questions~=bcidkjdy^_71086.pdf downloaded by bwdawani from http://petergao.net/ustpastpaper/down.php?course=COMP1022Q&id=0 at 2015-07-12 21:42:37. Academic use within HKUST only.
When you open the Excel file that contains the VBA code shown above some message boxes
are shown. How many message boxes are shown? What messages are shown?
Answer:
How many message boxes are shown: _______________________________
_________________________________________________________________________________
Page 10 of 10