1. Which loop structure can we use to loop through a range object? a. FOR EACH c
ID: 3668429 • Letter: 1
Question
1. Which loop structure can we use to loop through a range object?
a. FOR EACH cell
b. SELECT CASE
c. IF THEN ELSE
2. What is the correct way to find the number of rows in a range object called 'Data'?
a. Data.Row
b. Data.Rows.Count
c. Data.Count
3. Which statement will collect the first row of a data range called rgOutput?
a. OutputRow = Row(rgOutput)
b. OutputRow = rgOutput.Row
c. OutputRow = Cells(rgOutput)
4. Which statement will turn the range entered in a RefEdit box on a form into a range object?
a. Set rgOutput = Range(Me.refOutputRange)
b. rgOutput = Me.refOutputRange
c. Me.refOutputRange = rgOutput
5. What is the correct way to select a range of data to store in a range object that goes from row 2 to an undetermined number of rows across columns A - D?
a. Set rgData = Range(Range("A2"), Range("A2").End(xlDown))
b. Set rgData = Range(Range("A2"), Range("A2").End(xlToRight))
c. Set rgData = Range(Range("A2"), Range("D2").End(xlDown))
d. Set rgData = Range(Range("A1"), Range("D1").End(xlDown))
Explanation / Answer
Answer for Question 1:
Option A: i.e for each loop
for each cell loop structure can we use to loop through a range object
Answer for Question 2:
Option B: i.e Data.Rows.Count
Answer for Question 3:
Option B: i.e OutputRow = rgOutput.Row
the below statement will get the first row of a data range called rgOutput
b. OutputRow = rgOutput.Row
Answer for Question 4:
Option a: Set rgOutput = Range(Me.refOutputRange)
Answer for Question 5:
Option C: Set rgData = Range(Range("A2"), Range("D2").End(xlDown))
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.