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).
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).
Q2. Write a VBA
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 ***).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps