Answered step by step
Verified Expert Solution
Question
1 Approved Answer
P1: (100 pts) Write a VBA program to do the following, being sure to include high-quality comments throughout. Please note - Although this is a
P1: (100 pts) Write a VBA program to do the following, being sure to include high-quality comments throughout. Please note - Although this is a single program, you should do each of the sub-parts of this problem as its own "block" of code. In other words, do not use one loop that tries to do parts I, 2, and 3 together 1. Create a text file with 3500 rows containing four columns of random numbers (type single) between 10.00 and 99.99. Close the file! 2. Prompt the user for an allowable range of values, by having them input two numbers: a high-limit and low-limit value (type single). If the low limit is below 10.1 or above 99.5, set it to 10.0; if the high limit is above 99.99 or below 11.0, set it to 100.0; if the high is below the low, set it to 20% above the low (even if this pushes it above 100, which could happen in some cases) 3. Open the file that you created in Part 1. Read each value in the file - when you encounter an out-of-range value, write it to column A, beginning in row 2 and proceeding with no gaps row by row. When you encounter an in-range value, write it to column C beginning in row 2. Label both columns appropriately (in row 1). Close the file! 4. Open the file you created in Part 1. Read the values in the file and determine what percentage of values in each of the columns in the file are within the range specified by the user in part 2 (that is, equal to or between the high and low limit). Report the result in a single well-formatted message box. Close the file
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