Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create these using VBA 1 3 7 8 9 O O OO 0 Immediate 123456789mnHB VS 11 12 13 14 15 16 VS 1 5

Create these using VBAimage text in transcribed

1 3 7 8 9 O O OO 0 Immediate 123456789mnHB VS 11 12 13 14 15 16 VS 1 5 Use a For Each loop to create a list of schools and display in a message box 6 Use nested For Loops to create a list of all possible pairs of comparisons for a given number of options 7 Instructions: 8 This will be all new code. 9 Microsoft Excel 10 Part A: School List 11 Create a range variable (named rngIndex) that represents the list of numbers Boston College EAGLES Canisius GOLDEN GRIFFINS 12 in column A of the Data sheet. Creighton BLUEJAYS Detroit Mercy TITANS 13 SET that variable to cells A2 to A21 of the Data sheet but DO NOT hardcode the reference. Fairfield STAGS 14 Fordham RAMS Use a combination of Offset and End(xIDown) to determine the current size of the range. Georgetown HOYAS 15 Loop through each cell in rngIndex and create a string variable (strList) that shows the Gonzaga BULLDOGS/ZAGS Holy Cross CRUSADERS 10 16 AlphaOrder, Name and Mascot where mascot is in uppercase. (Use UCASE function.) Loyola Chicago RAMBLERS Loyola Maryland GREYHOUNDS 17 Display that string in a message box as in the example >> Loyola Marymount LIONS Marquette GOLDEN EAGLES 18 Attach the code to this button to execute. Saint Joseph's HAWKS Saint Louis BILLIKENS 19 Lines of code needed: about 10 Make List Saint Peter's PEACOCKS 17 San Francisco DONS 20 Santa Clara BRONCOS Seattle REDHAWKS 21 Xavier MUSKETEERS 22 Part B: Nested Loops to create pair sets to compare 23 When comparing every option to every other option, we can determine 24 the number of options with the formula 25 pairs = (options - 1) * (options)/2 26 Prompt the user to enter the number of options, then display 27 in a messagebox the number of pairs to be created. Microsoft Excel 28 Pass that value to a new sub that handles the next steps. How many options? 29 Use a pair of nested loops to create every possible pair without You will have 15 pairs to review. 30 repeating any pairs. Print each pair to the immediate window 31 using Debug. Print. (assuming user entered 6 as in the GI 32 example screen shots, output would resemble >>) 33 Attach code to the Make Pairs button. Make Pairs 34 35 Lines of code needed: about 14 including 4 DIM statements WRONG Dupes 18 19 20 VO ws OK va VO CORRECT va V3 V3 Immediate 1 OO O OO 3 VS ve Vs Ve V3 V3 Va va V3 V3 VS 1 1 1 Microsoft Excel 5 OK 3 VS VS Cancel 1 5 6 OK V3 Vs VS ve Vs VS 3 5 5 VS 6 WRONG: shows 36 pairs should only be 15 1 3 7 8 9 O O OO 0 Immediate 123456789mnHB VS 11 12 13 14 15 16 VS 1 5 Use a For Each loop to create a list of schools and display in a message box 6 Use nested For Loops to create a list of all possible pairs of comparisons for a given number of options 7 Instructions: 8 This will be all new code. 9 Microsoft Excel 10 Part A: School List 11 Create a range variable (named rngIndex) that represents the list of numbers Boston College EAGLES Canisius GOLDEN GRIFFINS 12 in column A of the Data sheet. Creighton BLUEJAYS Detroit Mercy TITANS 13 SET that variable to cells A2 to A21 of the Data sheet but DO NOT hardcode the reference. Fairfield STAGS 14 Fordham RAMS Use a combination of Offset and End(xIDown) to determine the current size of the range. Georgetown HOYAS 15 Loop through each cell in rngIndex and create a string variable (strList) that shows the Gonzaga BULLDOGS/ZAGS Holy Cross CRUSADERS 10 16 AlphaOrder, Name and Mascot where mascot is in uppercase. (Use UCASE function.) Loyola Chicago RAMBLERS Loyola Maryland GREYHOUNDS 17 Display that string in a message box as in the example >> Loyola Marymount LIONS Marquette GOLDEN EAGLES 18 Attach the code to this button to execute. Saint Joseph's HAWKS Saint Louis BILLIKENS 19 Lines of code needed: about 10 Make List Saint Peter's PEACOCKS 17 San Francisco DONS 20 Santa Clara BRONCOS Seattle REDHAWKS 21 Xavier MUSKETEERS 22 Part B: Nested Loops to create pair sets to compare 23 When comparing every option to every other option, we can determine 24 the number of options with the formula 25 pairs = (options - 1) * (options)/2 26 Prompt the user to enter the number of options, then display 27 in a messagebox the number of pairs to be created. Microsoft Excel 28 Pass that value to a new sub that handles the next steps. How many options? 29 Use a pair of nested loops to create every possible pair without You will have 15 pairs to review. 30 repeating any pairs. Print each pair to the immediate window 31 using Debug. Print. (assuming user entered 6 as in the GI 32 example screen shots, output would resemble >>) 33 Attach code to the Make Pairs button. Make Pairs 34 35 Lines of code needed: about 14 including 4 DIM statements WRONG Dupes 18 19 20 VO ws OK va VO CORRECT va V3 V3 Immediate 1 OO O OO 3 VS ve Vs Ve V3 V3 Va va V3 V3 VS 1 1 1 Microsoft Excel 5 OK 3 VS VS Cancel 1 5 6 OK V3 Vs VS ve Vs VS 3 5 5 VS 6 WRONG: shows 36 pairs should only be 15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions