Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using excel VBA code 4) You take a job at an independent product quality testing consulting company that works extensively food and beverage industries. Your
using excel VBA code
4) You take a job at an independent product quality testing consulting company that works extensively food and beverage industries. Your first job is to test the concentration of "natural flavors" in different new soft drink formulations due to health concerns resulting in excessive natural flavor" intake in some individuals. For your tests, multiple samples are taken from a batch of a given formulation and the samples are tested for natural flavor" concentration. A formulation is unacceptable if 20% of the samples exceed the upper concentration limit. Another metric involves comparing the average concentration of both the entire set of samples and that of only those samples below the upper concentration limit. Write a program that analyzes the concentration testing data. Program inputs: Upper concentration limit (from worksheet) Sample concentrations. Since this test is for multiple product formulations, the program must be able to handle any number of samples. (So the first step is figuring out how many samples there are. The example given to you has 13 samples, but your program should be able to work on any number of samples). Program output (as shown in the example): Place an "X" in the "Above" column next to any sample that has a higher concentration than the Upper Limit. Number of samples over the limit % of samples over the limit Average pressure of all samples Average pressure of the non-rejected samples The first thing the program should do is clear any existing outputs. The ClearContents command is useful when clearing blocks of cells. To clear the columns with X (denoting samples above the limit), the following command could be used. Range ("d5:d200").clearContents The sample data in the problem is given. Output for this example is shown on the figure displayed on the following page. Use the example to help build and test your program, but also test it for different numbers of samples and different data to validate that your program works correctlyStep 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