PDA

View Full Version : Class Project for bnwhite



bnwhite
09-29-2008, 01:50 PM
I am a student and enrolled in a required VBA class online. The professor offers no help whatsoever and and I have no background in excel/vba macros. The book assigned to the class does not help in how to create a a macro, the steps, or the loops i need. My professor has assigned a project due by midnight wednesday night. can anyone help me ASAP?? I am sure it would take someone who knows what they are doing 15 minutes. or could someone at least help me?

PLEASE PLEASE PLEASE!!!! I cannot let this class pull my GPA down!

grichey
09-29-2008, 02:06 PM
voteban

How is anyone ever going to help you if all you do is complain and not provide any info.

Kenneth Hobs
09-29-2008, 02:07 PM
http://www.mvps.org/dmcritchie/excel/getstarted.htm

MaximS
09-29-2008, 02:09 PM
List all the things you need to learn and we will give you few quick lessons :)

bnwhite
09-29-2008, 02:16 PM
This is what the project requires. I don't even know the first thing to do besides press alt+F11 to get started!!
Create a module called Calculations that will perform the following tasks:
1. Prompt the user to enter the number of random numbers between 20 and 100 to be generated.[/font]
2. Use a While/Wend loop to generate the random numbers, and write them to A1:A100.
3. Calculate average of the random numbers; write a label in C1 and the average in D1; also the average should be rounded to a whole number
4. 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
5. Since each number must be passed to Compare, a While/Wend loop should be constructed first
6. 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 function7. 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
8. Create a Clear Module that will clear the spreadsheet