Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using VBA create the following code based off the given instructions, code should run for more columns of data if the data is entered Place
Using VBA create the following code based off the given instructions, code should run for more columns of data if the data is entered
Place a control button in the worksheet that calls a VBA macro that processes the following sales data (your final code should work with data sheets that have more or fewer regions and more or fewer months of data). Write your code so that it runs on the active worksheet. 636 Month Jan-13 Feb-13 Mar-13 Apr-13 May-13 Jun-13 Jul-13 Aug-13 Sep-13 Oct-13 Nov-13 Dec-13 Jan-14 Feb-14 Mar-14 Apr-14 May-14 Jun-14 Jul-14 Aug-14 Sep-14 Region 1 Region 2 Region 3 Region 4 1351 383 1432 1519 1218 617 1467 1504 1694 873 1092 1137 1652 1096 1227 1301 574 1355 1170 1264 451 978 1696 1073 945 958 1113 1512 567 1038 1501 1752 515 1397 1378 1664 704 938 1601 1657 477 904 1381 1359 510 1210 1188 1801 317 1158 1158 1509 552 1332 1598 1329 828 1432 1636 1337 807 1399 1317 1052 341 1178 1327 1708 992 1495 1331 1596 524 1058 1103 1535 897 1272 1371 1856 628 1023 1414 Where Month is in cell A3 and in cell A1 is your name. Using cell A3 as an anchor cell, code the following tasks in VB (Do NOT use For Next Loops): 1. Find out the number of regions with data 2. Find out the number of months with data 3. Format the header (Region 1, ..., Region 4) so that they are horizontally centered, have green background, bold, italic and black text. 4. Add the word Total two columns after the last region in the data and on the same row of the header row. Center the text horizontally and make the background yellow, bold, italic and blue color. 5. Using R1C1 notation place a formulas under the header Total with the sum of the sales in the regions for each of the months in the data. 6. Format the numbers for the total using the NumberFormat =0 property for a range. 7. Use an input box to ask for the number of months in the moving average of total sales. Get the response to the input box in a string variable and check for a numeric value. If it is not a numeric value, show a message box and stop the program. Place a control button in the worksheet that calls a VBA macro that processes the following sales data (your final code should work with data sheets that have more or fewer regions and more or fewer months of data). Write your code so that it runs on the active worksheet. 636 Month Jan-13 Feb-13 Mar-13 Apr-13 May-13 Jun-13 Jul-13 Aug-13 Sep-13 Oct-13 Nov-13 Dec-13 Jan-14 Feb-14 Mar-14 Apr-14 May-14 Jun-14 Jul-14 Aug-14 Sep-14 Region 1 Region 2 Region 3 Region 4 1351 383 1432 1519 1218 617 1467 1504 1694 873 1092 1137 1652 1096 1227 1301 574 1355 1170 1264 451 978 1696 1073 945 958 1113 1512 567 1038 1501 1752 515 1397 1378 1664 704 938 1601 1657 477 904 1381 1359 510 1210 1188 1801 317 1158 1158 1509 552 1332 1598 1329 828 1432 1636 1337 807 1399 1317 1052 341 1178 1327 1708 992 1495 1331 1596 524 1058 1103 1535 897 1272 1371 1856 628 1023 1414 Where Month is in cell A3 and in cell A1 is your name. Using cell A3 as an anchor cell, code the following tasks in VB (Do NOT use For Next Loops): 1. Find out the number of regions with data 2. Find out the number of months with data 3. Format the header (Region 1, ..., Region 4) so that they are horizontally centered, have green background, bold, italic and black text. 4. Add the word Total two columns after the last region in the data and on the same row of the header row. Center the text horizontally and make the background yellow, bold, italic and blue color. 5. Using R1C1 notation place a formulas under the header Total with the sum of the sales in the regions for each of the months in the data. 6. Format the numbers for the total using the NumberFormat =0 property for a range. 7. Use an input box to ask for the number of months in the moving average of total sales. Get the response to the input box in a string variable and check for a numeric value. If it is not a numeric value, show a message box and stop the programStep 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