A friend and I are learning how to do simple VBA subroutines in the
hope that we can develop the knowledge to help us in our stocks
portfolio management. We're a bit stuck (we each get diff answers)with
the following three subroutines. I understand that there are usually
at least 2 methods to a solution but I will be happy with one solution
to each subroutine. I am meeting him in 72 hours so would only like
this answered if it can be done so in the next two or three days.
People who are fluent in Excel VBA tend to be able to write each of
these routines / functions in five or ten minutes.
Here are the ones we are struggling to write:
1. A subroutine that generates the Fabonacci sequence of numbers (the
first n numbers, where n is an integer number that the user inputs).
For example, the first seven numbers will be 0,1,1,2,3,5,8,..
2. a subroutine that generates Pascal?s triangle (the first n rows,
where n is an integer number that the user inputs). For example, the
first three rows will be: 1, 1 1, 1 2 1, ?
3. a function that calculates the number of business days between two
given dates. The user inputs the two dates, upon which the number of
business days are returned. |