programming assistance

  • Thread starter Thread starter biker man
  • Start date Start date
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
 
=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)
 
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.
 
Back
Top