programming assistance

B

biker man

I want to write a program that takes a
number,x, from cell A3 and a positive integer, n, from cell B3 then
returns into cell C3 the value of x raised to the power n divided by
n factorial.

i want to add error checking so that a negative value of n cannot be
used

i entered this in cell C3

=IF(B3=",", IF(B3<=0," Integer in B3 must be positive",(A3^B3)/B3)

but all i get is a FALSE coem up in the cell

but i need to return in cell C3 the value of x raised to the power n
divided by n factorial.

Also do i need to write anyhting in VBA for this too work or not???

any help
 
B

Bob Phillips

=IF(B3="","",IF(B3<=0,"Integer in B3 must be positive",(A3^B3)/B3))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

Dave O

Here's one answer:

=IF(B3<=0,"Integer in B" & ROW() &" must be positive",(A3^B3)/
FACT(B3))

ROW() returns the formula's row number, in case you need to apply this
formula to different cells.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

formula help 2
vba programming 1
coding and helping to launch vba 1
programming help 2
Formula confusion 4
vba 3
vba 2
vba help 1

Top