PDA

View Full Version : Compare Private Function help.



bnwhite
09-29-2008, 04:56 PM
I need to create a private function called compare that does the following:

1.Create a private function called Compare that has two arguments: The random number and the average. The function will return an integer. The function will test three conditions:
1. Number is greater than average, return a 1
2. Number is equal to average, return a 2
3. Number is less than the average, return a 3
2.Since each number must be passed to Compare, a While/Wend loop should be constructed first
3.With in the body of the loop, an If/Then/ElseIf statement will be required to invoke the function; pass random number and pass average; determine if a 1, 2, or 3 was returned from Compare function.
4.If the result is a 1, a label stating the number is greater than the average should be written to the sheet. If the result is 2, a label stating the number is equal to the average should be written to the sheet. If the result is 3, a label stating the number is less than the average should be written to the sheet

lucas
09-29-2008, 09:15 PM
Please stick to one thread with your question. Posting multiple posts with the same question will not help you get help any faster, in fact it makes things confusing and if people catch you at it they will stop helping you at all.

I also notice that you fail to declare that this is classwork in this post. We have strict rules about classwork. Doesn't mean folks won't help you but will not give you a full solution. You will have to do your own work and ask specific questions.

Thanks for understanding......I am locking this thread. Continue your discussion and questions in your original thread.