Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi im required to write an asessment for vba, and was wondering if
someone could give me an example of how to do it, i really want to learn how to do it because it will come up in my exam. so if someone could show me an example of how to do it i would be grateful. write a programme that takes a number X from cell A3 and a positive integer from cell B3 - then return it into cell C3. the value of X raised to the power N divided by N factorial could anyone help me as to how to approach this and what it means?? thanks please |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just so we're all clear here...
Are these problems you present actual exam questions or sample problems? I wouldn't want to facilitate cheating, after all... In any case, these aren't too bad. Regarding the first problem, what do you want to do with the two values obtained from A3 and B3? Multiply? Also, the second problem can be solved with the following formula: =(X ^ N) / FACT(N) or the following VBA function: Function test(x As Range, N As Range) As Double test = (x ^ N) / Application.WorksheetFunction.Fact(N) End Function Functions are special VBA programs that can be called from a cell within Excel. That is, put this function in a module in a workbook, and then you can type =test(2,5) in a cell to obtain the result of 0.2667. Search the VBA help files for "Function" for more information on this. HTH, Pflugs "paul" wrote: Hi im required to write an asessment for vba, and was wondering if someone could give me an example of how to do it, i really want to learn how to do it because it will come up in my exam. so if someone could show me an example of how to do it i would be grateful. write a programme that takes a number X from cell A3 and a positive integer from cell B3 - then return it into cell C3. the value of X raised to the power N divided by N factorial could anyone help me as to how to approach this and what it means?? thanks please |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ASSESSMENT FORMULA | Excel Worksheet Functions | |||
Possible questions on assessment test | Excel Discussion (Misc queries) | |||
Assessment Worksheet | Excel Discussion (Misc queries) | |||
employee assessment test | Excel Discussion (Misc queries) | |||
Capacity Assessment | Excel Discussion (Misc queries) |