Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need a VBA Code in excel for this problem. Part 1 Relevance: There are many ca

ID: 3874950 • Letter: I

Question

I need a VBA Code in excel for this problem.

Part 1 Relevance: There are many cases where we might need to monitor a stream of data and take action based upon the data values. Examples include varying the colors on the light bar in a tractor guidance system depending on the magnitude of course deviation; adjusting dilution water flow rate depending on the readings from inflow nitrate sensors at a water treatment plant; or using fermenter pH sensor data to trigger acid/base addition pumps. Problem Statement: Write a single well-commented program to receive and store a flow of data, and to indicate if and when that data is out of range. Additional Requirements/Details: Your program should: Query the user for 10 data values, one at a time. (In practice, this user input would typically be replaced with a call to a sensor and the process would run continuously until a stopping criterion was reached.) Request the user enter numerical values above zero (assume it is single precision data type) If any value exceeds 100, use a message box to notify the user that there's a problem. For extra credit, sound an alarm when the message box comes up. Log all input data values in a 1-d array. In a second 1-d array, log a text description of the status for each input data value (for example, "AOK" or "Above Range"). · . Note: For full credit we are only requiring you to populate the arrays, not print the arrays out anywhere. But you won't really know if your code is working unless you actually look at the results, so you will probably want to include for your own purpose putting those arrays into the o Excel worksheet.

Explanation / Answer

VBA code :

If securities( i ) > 0 then

If securities( i ) > 100 then

varArray( i ) = " Above Range "

End If

End If

  

End sub

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote