Q1. Write a reference, in VBA code, to each of the following ranges. (You can assume that each of these ranges is in the active worksheet of the active workbook, so that you don’t have to qualify the references by worksheet or workbook.) Here’s an example. Question: The cell one column to the right and two rows below Cell A1. Answer: Range (“A1”).Offset(2,1) The fifth cell of the range B1:B30. The cell at the intersection of the 25th row and 5th column of the range A1:Z100. The cell at the intersection of the 25th row and 5th column of the range that has been set to a Range object variable named SalesRange. The entire column corresponding to cell C5. A range of employee names, assuming the first is in cell B2 and they extend down column B (although you don’t know how many there are).

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter8: Working With Trendlines, Pivottables, Pivotcharts, And Slicers
Section: Chapter Questions
Problem 8EYW
icon
Related questions
Question

Q1. Write a reference, in VBA code, to each of the following ranges. (You can assume that each of these ranges is in the active worksheet of the active workbook, so that you don’t have to qualify the references by worksheet or workbook.) Here’s an example. Question: The cell one column to the right and two rows below Cell A1. Answer: Range (“A1”).Offset(2,1)

  1. The fifth cell of the range B1:B30.
  2. The cell at the intersection of the 25th row and 5th column of the range A1:Z100.
  3. The cell at the intersection of the 25th row and 5th column of the range that has been set to a Range object variable named SalesRange.
  4. The entire column corresponding to cell C5.
  5. A range of employee names, assuming the first is in cell B2 and they extend down column B (although you don’t know how many there are).

 

Q2. Write a VBA program (consisting of a single subroutine) to check existence of a given value in a list. Specifically, you are given a list of product IDs in column A, as follows:

 

 

You don’t know how many products there are. The user enters a value in an input box (e.g. X-7942) and the code checks this against the list and returns a message box stating either that the product is in the list (e.g. “Product X-7942 was found”) or not (“Product X-7942 was NOT found”). Write the code here (*** no need to turn in any Excel file ***).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Lock objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning