Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Martin
 
Posts: n/a
Default Function giving Error

Hi,

I am Using Office XP and i am writing a function in Excel that is giving me
an error "The formula you type contains an error...."

here is my function

=IF(B20="Semiprecious",VLOOKUP(ROUND(RAND()*100,0) ,semiprecious,2),IF(B20="Fancy",VLOOKUP(ROUND(RAND ()*100,0),fancy,2),IF(B20="Precious",VLOOKUP(ROUND (RAND()*100,0),precious,2),IF(B20="Gems",VLOOKUP(R OUND(RAND()*100,0),gem,2),IF(B20="Jewels",VLOOKUP( ROUND(RAND()*100,0),jewel,2),IF(B20="Ornamental",V LOOKUP(ROUND(RAND()*100,0),ornamental,2)))))))


The problem seem to be the last round(rand... function.
If i remove the last ROUND it work fine but when i put it in i am getting
the error. Is there a limitation with the number of function you can have in
a single cell ?


Any help greatly appreciated


Martin


  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 30 Sep 2005 22:06:56 -0400, "Martin" wrote:

Hi,

I am Using Office XP and i am writing a function in Excel that is giving me
an error "The formula you type contains an error...."

here is my function

=IF(B20="Semiprecious",VLOOKUP(ROUND(RAND()*100,0 ),semiprecious,2),IF(B20="Fancy",VLOOKUP(ROUND(RAN D()*100,0),fancy,2),IF(B20="Precious",VLOOKUP(ROUN D(RAND()*100,0),precious,2),IF(B20="Gems",VLOOKUP( ROUND(RAND()*100,0),gem,2),IF(B20="Jewels",VLOOKUP (ROUND(RAND()*100,0),jewel,2),IF(B20="Ornamental", VLOOKUP(ROUND(RAND()*100,0),ornamental,2)))))))


The problem seem to be the last round(rand... function.
If i remove the last ROUND it work fine but when i put it in i am getting
the error. Is there a limitation with the number of function you can have in
a single cell ?





--ron
  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 30 Sep 2005 22:06:56 -0400, "Martin" wrote:

Hi,

I am Using Office XP and i am writing a function in Excel that is giving me
an error "The formula you type contains an error...."

here is my function

=IF(B20="Semiprecious",VLOOKUP(ROUND(RAND()*100,0 ),semiprecious,2),IF(B20="Fancy",VLOOKUP(ROUND(RAN D()*100,0),fancy,2),IF(B20="Precious",VLOOKUP(ROUN D(RAND()*100,0),precious,2),IF(B20="Gems",VLOOKUP( ROUND(RAND()*100,0),gem,2),IF(B20="Jewels",VLOOKUP (ROUND(RAND()*100,0),jewel,2),IF(B20="Ornamental", VLOOKUP(ROUND(RAND()*100,0),ornamental,2)))))))


The problem seem to be the last round(rand... function.
If i remove the last ROUND it work fine but when i put it in i am getting
the error. Is there a limitation with the number of function you can have in
a single cell ?


Any help greatly appreciated


Martin


You may find all of the limits by typing 'specifications' into the HELP box.

In your case, the RAND() function exceeds the seven limit number of nested
functions.


--ron
  #4   Report Post  
Myrna Larson
 
Posts: n/a
Default

I replied to your posting in the misc newsgroup. Please don't cross-post or
multi-post. The people who answer questions here ordinarily read all of the
groups.

On Fri, 30 Sep 2005 22:06:56 -0400, "Martin" wrote:

Hi,

I am Using Office XP and i am writing a function in Excel that is giving me
an error "The formula you type contains an error...."

here is my function

=IF(B20="Semiprecious",VLOOKUP(ROUND(RAND()*100,0 ),semiprecious,2),IF(B20="Fancy",VLOOKUP(ROUND(RAN D()*100,0),fancy,2),IF(B20="Precious",VLOOKUP(ROUN D(RAND()*100,0),precious,2),IF(B20="Gems",VLOOKUP( ROUND(RAND()*100,0),gem,2),IF(B20="Jewels",VLOOKUP (ROUND(RAND()*100,0),jewel,2),IF(B20="Ornamental", VLOOKUP(ROUND(RAND()*100,0),ornamental,2)))))))


The problem seem to be the last round(rand... function.
If i remove the last ROUND it work fine but when i put it in i am getting
the error. Is there a limitation with the number of function you can have in
a single cell ?


Any help greatly appreciated


Martin

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
Custom function returning VALUE error alex.k Excel Discussion (Misc queries) 6 September 27th 05 03:05 AM
@ and "function not valid" error (Excel 2003) Acert93 New Users to Excel 1 September 2nd 05 07:17 AM
#Name? Error in User Defined VB Function idgity Excel Worksheet Functions 2 August 30th 05 08:58 PM
Nested IF AND OR function Inexplicable error MichaelC Excel Worksheet Functions 7 August 22nd 05 10:46 PM
Why do I get a #Name error when I use the DateDif function? PhilS Excel Worksheet Functions 9 April 5th 05 04:51 PM


All times are GMT +1. The time now is 11:16 PM.

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"