Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with VBA coding! Thank you! First picture is original. Second picture is what the result should look like. Third picture is the questions.
Need help with VBA coding! Thank you!
Paste BIUA Me Clipboardr Font Alignment R20C4 8 1 ID Score1 Score2 Score3 Score4 Score5 61 65 67 67 65 69 97 85 76 91 79 79 82 62 67 96 62 7726087 97 76 84 10096 100 76 72 94 94 62 100 69 97 10 12 13 ID 14 15 16 17 18 19 20 21 SSN 1 815-65-3607 2 768-30-8255 3 818-12-9031 4 790-77-1029 5 958-92-8572 6 730-64-7576 7 903-60-2172 8 853-29-3603 23 24 25 26 27 28 Problem Problem final look O Type here to search HW6.1 19a(1) () Excel Insert Page Layout Formulas Data Review View Developer Add-ins Help T Calibri Wrap Text 20AA Paste BIUA E Merge & Center Clipboard 1 ID Scorei Score2 Score3 Score4 Score5 tu SSN 355 815-65-3607 346 768-30-8255 438 818-12-9031 376 790-77-1029 61 65 69 97 76 91 79 79 62 67 62 87 97 76 80 72 100 62 415 958-92-8572 447 730-64-7576 394 903-60-2172 422 853-29-3603 94 76 72 100 10 12 13 ID SSN 14 1 815-65-3607 15 2 768-30-8255 16 3 818-12-9031 17 4 790-77-1029 18 5958-92-8572 19 6 730-64-7576 20 7903-60-2172 21 8 853-29-3603 24 25 27 28 Problem Problem final look O Type here to search Microsoft Visual Basic for Applications- Hw6.1 19a() (0xlsm -[Module1 (Code)l Eile Edit View Insert Format Debug Bun Tools Bdd-Ins Window Help X (General) (Declarations) Option ExplicitI Sub HW6 10 '1. Use the score data in worksheet."Problem (wsData) 2. Define a range variable (anchorcell) land assign it Cell A1 3. Using the offset property of the anchorce11, use a message box to display the value in cell D 4. Using the cells property of the anchorCell, ' the value in cell C3 use a message box to display s. Using range, anchorCel1, the end property, select the range for the cells with the ID and SSN/ (Rint: Use xlDown two times to get to the top of the desired range/and three times to get to the bottom of the desired range.) '6. Using range, anchorcell, the end property and the currentRegion property to select the range for the cells with the ID and SSN 7. Using the anchorcell, offset with the end property and the FormulaR1C1 properties place a formu la under the column H that calculates the average over scores 1/to 5 for all roMs 2 to 9. reference a cell, cop the SSN from the range B13:821 to column 11 executed, then the sorting by a) s no longer valid.) the property Resize(Rows, Cols). Then highlight the following: ' 8. Using the copy and paste methods and using the anchorCell and offset to ' 9. Sort cells in range A2: 19 according to a) descending SSN, b) ascending ' score! (note: step through the corn to see the effect because once b) is 10. Using the anchorCell and the offset property, redefine a new range with 4 rOwS and 4 columns with the upper left-hand corner being cell C4 (Bing: use , a. the 3-rd row from the top of the range of the data in yellow b. the fifth column from the left of the range of the data in red c. the Complete 7-th row from the top of the data in magenta d. the complete 6-th column from the left of the data in green sData.Cells ClearFormats End Sub First picture is original.
Second picture is what the result should look like.
Third picture is the questions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started