Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
G_Chem
 
Posts: n/a
Default Too many arguments, IF only I could sort it out


excel 97

Hi,

I am using the value returned from a drop down list to control which
formula is used to return a value in a cell.

There are 4 options on the list: Alpha, Beta, Alpha Infinite Depth and
Beta Infinite Depth.

Here is how I'm trying to compose the argument:

=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2), IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2))))

this returns the "too many arguments" error message

*DUH! * You say, as you can only compose 3 at a time.

Well thats what I don't quite understand, even after reading as much of
the excel help, Microsoft Knowledge base and rooting around various
threads/tutorials.

I can't get my head round how to arrange it.

this works:
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)))

this doesn't :
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2)))


Can you explain it like you would to a 4 year old? :)

here it is laid out:

=IF(A24="Alpha",H2*SQRT(J2/F2)
IF(A24="Beta",H2*SQRT(J2/999))
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2),
IF(A24="Beta Infinite Depth",H2*SQRT(J2/H2))))

thanks for any help, the logic of this escapes me.


--
G_Chem
------------------------------------------------------------------------
G_Chem's Profile: http://www.excelforum.com/member.php...o&userid=24366
View this thread: http://www.excelforum.com/showthread...hreadid=381215

  #2   Report Post  
greg7468
 
Posts: n/a
Default


Hi, I think you just have some of the brackets in the wrong place,

try this

=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2), IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2)))))

HTH.


--
greg7468


------------------------------------------------------------------------
greg7468's Profile: http://www.excelforum.com/member.php...fo&userid=9031
View this thread: http://www.excelforum.com/showthread...hreadid=381215

  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

G,

Nesting functions (like these IF's) gets messy. A more manageable way is to
use a VLOOKUP to find the result you want. Set up a table somewhere like
this:

Alpha | =H2*SQRT(J2/F2)
Beta | =H2*SQRT(J2/999)
Alpha Infinite Depth | etc.
Beta Infinite Depth |

Now in the original cell (where you want the result, use:

=VLOOKUP(A24, Table, 2, FALSE)

Table is a reference to the table. It might look like A100:B103. Or it
could be a named range. Like "Table." It could be in some hidden rows or
column, or even on another sheet. Untested.
--
Earl Kiosterud
www.smokeylake.com/
-------------------------------------------

"G_Chem" wrote in
message ...

excel 97

Hi,

I am using the value returned from a drop down list to control which
formula is used to return a value in a cell.

There are 4 options on the list: Alpha, Beta, Alpha Infinite Depth and
Beta Infinite Depth.

Here is how I'm trying to compose the argument:

=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2), IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2))))

this returns the "too many arguments" error message

*DUH! * You say, as you can only compose 3 at a time.

Well thats what I don't quite understand, even after reading as much of
the excel help, Microsoft Knowledge base and rooting around various
threads/tutorials.

I can't get my head round how to arrange it.

this works:
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)))

this doesn't :
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2)))


Can you explain it like you would to a 4 year old? :)

here it is laid out:

=IF(A24="Alpha",H2*SQRT(J2/F2)
IF(A24="Beta",H2*SQRT(J2/999))
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2),
IF(A24="Beta Infinite Depth",H2*SQRT(J2/H2))))

thanks for any help, the logic of this escapes me.


--
G_Chem
------------------------------------------------------------------------
G_Chem's Profile:
http://www.excelforum.com/member.php...o&userid=24366
View this thread: http://www.excelforum.com/showthread...hreadid=381215



  #4   Report Post  
JoyS
 
Posts: n/a
Default

Try ";" as list separator instead of ","
It works in my worksheet, your formula is true

JoyS


"G_Chem" wrote:


excel 97

Hi,

I am using the value returned from a drop down list to control which
formula is used to return a value in a cell.

There are 4 options on the list: Alpha, Beta, Alpha Infinite Depth and
Beta Infinite Depth.

Here is how I'm trying to compose the argument:

=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2), IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2))))

this returns the "too many arguments" error message

*DUH! * You say, as you can only compose 3 at a time.

Well thats what I don't quite understand, even after reading as much of
the excel help, Microsoft Knowledge base and rooting around various
threads/tutorials.

I can't get my head round how to arrange it.

this works:
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)))

this doesn't :
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2)))


Can you explain it like you would to a 4 year old? :)

here it is laid out:

=IF(A24="Alpha",H2*SQRT(J2/F2)
IF(A24="Beta",H2*SQRT(J2/999))
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2),
IF(A24="Beta Infinite Depth",H2*SQRT(J2/H2))))

thanks for any help, the logic of this escapes me.


--
G_Chem
------------------------------------------------------------------------
G_Chem's Profile: http://www.excelforum.com/member.php...o&userid=24366
View this thread: http://www.excelforum.com/showthread...hreadid=381215


  #5   Report Post  
Jim Cone
 
Posts: n/a
Default

G,

Move one of the ")" following "J2/999" to the end of the formula.
So...
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2),IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2)))))

Jim Cone
San Francisco, USA



"G_Chem" wrote in
message ...
excel 97
Hi,
I am using the value returned from a drop down list to control which
formula is used to return a value in a cell.
There are 4 options on the list: Alpha, Beta, Alpha Infinite Depth and
Beta Infinite Depth.
Here is how I'm trying to compose the argument:
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2), IF(A24="Beta Infinite
Depth",H2*SQRT(J2/H2))))

this returns the "too many arguments" error message

*DUH! * You say, as you can only compose 3 at a time.
Well thats what I don't quite understand, even after reading as much of
the excel help, Microsoft Knowledge base and rooting around various
threads/tutorials.
I can't get my head round how to arrange it.
this works:
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)))
this doesn't :
=IF(A24="Alpha",H2*SQRT(J2/F2),IF(A24="Beta",H2*SQRT(J2/999)),
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2)))
Can you explain it like you would to a 4 year old? :)
here it is laid out:
=IF(A24="Alpha",H2*SQRT(J2/F2)
IF(A24="Beta",H2*SQRT(J2/999))
IF(A24="Alpha Infinite Depth",H2*SQRT(J2/H2),
IF(A24="Beta Infinite Depth",H2*SQRT(J2/H2))))
thanks for any help, the logic of this escapes me.
G_Chem



  #6   Report Post  
G_Chem
 
Posts: n/a
Default


thanks greg7468

that's done it! :)


--
G_Chem
------------------------------------------------------------------------
G_Chem's Profile: http://www.excelforum.com/member.php...o&userid=24366
View this thread: http://www.excelforum.com/showthread...hreadid=381215

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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
Sort Ascending button - Excel 2003 bigwheel Excel Discussion (Misc queries) 1 May 23rd 05 11:10 PM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 07:48 AM
Data > Sort function amnesia? Dave D Excel Discussion (Misc queries) 1 November 29th 04 10:44 PM


All times are GMT +1. The time now is 01:16 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"