Go over the example we worked on in Lecture 12 Then do the f

Go over the example we worked on in Lecture 12 Then do the following Use the score data in Sheet 1 (wsData) of the excel file Lecture 12 Define a range variable (anchorCell) and assign it Cell B2 Using the offset property of the anchorCell, use a message box to display the value in cell D5 Using the cells property of the anchorCell, use a message box to display the value in cell C3 Using range, anchorCell, and the end property, select the range for the cells with the ID and SSN Using range, anchorCell, the end property and the CurrentRegion property to select the range for the cells with the ID and SSN Using the anchorCell, offset with the end property and the FormulaR1C1 properties place a formula under the column H that calculates the average over scores 1 to 5 for all rows 2 to 9. Using the copy and paste methods and using the anchorCell and offset to reference a cell, copy the SSN from the range B13:B21 to column 11. Sort cells in range B3:G10according to descending SSN, ascending Score 1 Using the anchorCell and the offset property, redefine a new range with 4 rows and 4 columns with the upper left-hand comer being cell C4 Then highlight the following: Highlight the 3-rd row from the top of the range of the data in yellow Highlight the 5-th column from the left of the range of the data in red Highlight the complete 7-th row from the top of the data in magenta Highlight the complete 6-th column from the left of the data in green

Solution

1)
We can load excel sheet either nu giving excel name or using index
Worksheets(\"wsData\") or Worksheets(1)

Application.Range(\"Sheet1!C2:E5\")

------------------------------------------------------------------------------
2)
Dim anchorCell As Range
Set anchorCell = Application.Range(\"Sheet1!C2:E5\")
Set anchorCell = ws.Range(\"B2\")

-------------------------------------------------------------------------------------
3)
Dim res As Range
Set res = Range(\"D5\")
res.Offset(1).Select
MsgBox Worksheets.res

------------------------------------------------------------------------------
4)
Dim res As Range
Set res = Cells(3,3)
MsgBox Worksheets.res

 Go over the example we worked on in Lecture 12 Then do the following Use the score data in Sheet 1 (wsData) of the excel file Lecture 12 Define a range variabl

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site