PC Review


Reply
Thread Tools Rate Thread

continous assessment help with vba

 
 
paul
Guest
Posts: n/a
 
      17th Jul 2007
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 With Quote
 
 
 
 
=?Utf-8?B?UGZsdWdz?=
Guest
Posts: n/a
 
      17th Jul 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NOW AVAILABLE: Microsoft Assessment and Planning Solution Accelerator(formerly Windows Vista Hardware Assessment) baldwin.ng.usa@gmail.com Windows Vista Hardware 0 10th Mar 2008 06:08 AM
NOW AVAILABLE: Microsoft Assessment and Planning Solution Accelerator(formerly Windows Vista Hardware Assessment) baldwin.ng.usa@gmail.com Windows Vista General Discussion 0 10th Mar 2008 06:00 AM
Assessment 4 Michael Carty Microsoft Access 0 7th Nov 2007 09:43 AM
Assessment Zygy Windows Vista General Discussion 1 13th Jan 2007 08:58 AM
DNS Assessment adfreak Microsoft Windows 2000 DNS 0 25th Jul 2003 12:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:31 PM.