Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default programming assistance

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default programming assistance

how about

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


"biker man" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default programming assistance

=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)



"biker man" wrote in message
ups.com...
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default programming assistance

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
programming help biker man Excel Discussion (Misc queries) 2 July 22nd 07 11:54 PM
programming help Stan Excel Discussion (Misc queries) 2 April 23rd 07 02:44 PM
CD Programming nelson Excel Discussion (Misc queries) 0 June 4th 06 04:32 PM
programming ernie Excel Discussion (Misc queries) 4 March 13th 06 02:06 PM
Programming help BB Excel Discussion (Misc queries) 3 December 5th 05 01:09 AM


All times are GMT +1. The time now is 05:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"