Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bob
 
Posts: n/a
Default multiple "if" arguments

I have a workbook with week1,week2,week3,week4 and period
i am trying to input 1 in a3 week 1 for period a3 to show period 1 or input
5 in a3 week 1 for period a3 to show period 2 and so on
is there a formula for period a3 to show what period i am working on just by
inputing 1 or 5 or 9 so forth in week 1 a3?
any help or ideas will be welcome
  #2   Report Post  
pinmaster
 
Posts: n/a
Default multiple "if" arguments


Hi,
Try using a VLOOKUP formula instead. Start by creating a table
somewhere in your workbook with your input numbers in column 1 and the
corresponding period number in column 2, then:
=VLOOKUP(A3,your table,2,0)

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=479359

  #3   Report Post  
Posted to microsoft.public.excel.misc
bmccabe
 
Posts: n/a
Default Too many arguments

I am having a difficult time getting this if formula to work. All of the
individual pieces work fine and three pieces work as a three-argument
statement. When I add the last argument ...
IF(B28="neither",E2+e3+e4+E5+B19+B22+k49 ... I get this error: "You've
entered too many arguments for this function."

Here is the whole formula:

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Too many arguments

Did you mean this:

IF(B28="no",E2+E3+E4,+E5+K49
or
IF(B28="no",E2+E3+E4+E5+K49



bmccabe wrote:

I am having a difficult time getting this if formula to work. All of the
individual pieces work fine and three pieces work as a three-argument
statement. When I add the last argument ...
IF(B28="neither",E2+e3+e4+E5+B19+B22+k49 ... I get this error: "You've
entered too many arguments for this function."

Here is the whole formula:

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Too many arguments

You have an extra comma here
B28="no",E2+E3+E4,+E5+K49
use
B28="no",E2+E3+E4+E5+K49

You would probably want something like

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4+E5+K49,IF(B2
8="neither",E2+E3+E4+E5+B19+B22+K49,""))))



--

Regards,

Peo Sjoblom

"bmccabe" wrote in message
...
I am having a difficult time getting this if formula to work. All of the
individual pieces work fine and three pieces work as a three-argument
statement. When I add the last argument ...
IF(B28="neither",E2+e3+e4+E5+B19+B22+k49 ... I get this error: "You've
entered too many arguments for this function."

Here is the whole formula:


=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B
28="neither",E2+E3+E4+E5+B19+B22+k49))))





  #6   Report Post  
Posted to microsoft.public.excel.misc
wjohnson
 
Posts: n/a
Default multiple "if" arguments


Why not have the 3 different cells reference the "groups" of cells you
are adding for the different conditions. Then in your formula - make a
reference to the individual cells.
Your formula:
=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28=
"no",E2+E3+E4+E5+K49,IF(B28="neither",E2+E3+E4+E5+ B19+B22+K49,""))))
Example
Cell A1 contains the following SUM (E2+E3+E5+K49)
Cell B1 contains the following SUM (E2+E3+E4+E5+K49)
Cell C1 contains the following SUM (E2+E3+E4+E5+B19+B22+K49)
Then change the formula as follows:
=IF(B28="cash",0,IF(B28="yes",A1(B28=
"no",B1,IF(B28="neither",C1,""))))
Then I usually highlight the cells with a color to indicate an
"reference" to other cells, so I don't manually enter any text or
numbers into them.


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=479359

  #7   Report Post  
Posted to microsoft.public.excel.misc
Kris
 
Posts: n/a
Default Too many arguments

bmccabe wrote:

Here is the whole formula:

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))

^^^^^^^^^^^^
,+E5+K49 ?????

  #8   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE
 
Posts: n/a
Default Too many arguments

You should be able to simplify your formula as follows.

=IF(B28="cash",0,IF(B28="yes",SUM(E2,E3,E5,K49),IF (B28="no",SUM(E2:E5,K49),IF(B28="neither",SUM(E2:E 5,B19,B22,K49)))))

HTH,
Paul

"Kris" wrote in message
...
bmccabe wrote:

Here is the whole formula:
=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))

^^^^^^^^^^^^
,+E5+K49 ?????



  #9   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE
 
Posts: n/a
Default Too many arguments

In your previous formula, it looks like you had a stray comma.

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4 ,
+E5+K49,IF(B28="neither",E2+E3+E4+E5+B19+B22+k49)) ))

"PCLIVE" wrote in message
...
You should be able to simplify your formula as follows.

=IF(B28="cash",0,IF(B28="yes",SUM(E2,E3,E5,K49),IF (B28="no",SUM(E2:E5,K49),IF(B28="neither",SUM(E2:E 5,B19,B22,K49)))))

HTH,
Paul

"Kris" wrote in message
...
bmccabe wrote:

Here is the whole formula:
=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))

^^^^^^^^^^^^
,+E5+K49 ?????





  #10   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann
 
Posts: n/a
Default Too many arguments

Assuming that that others have been saying about the additional comma,
because you are referencing the same set of cell in all three options the
formula can be shortened to:

=IF(B28="cash",0,SUM(E2,E3,E5,K49)+IF(B28="no",E4, IF(B28="neither",SUM(E4,B19,B22),0)))

Note however that it will return SUM(E2,E3,E5,K49) for "yes" or any other
entry in B28 except "no" or "neither" If this is not acceptable then add
another IF before the SUM(E2,E3,E5,K49)

--
HTH

Sandy

with @tiscali.co.uk


"bmccabe" wrote in message
...
I am having a difficult time getting this if formula to work. All of the
individual pieces work fine and three pieces work as a three-argument
statement. When I add the last argument ...
IF(B28="neither",E2+e3+e4+E5+B19+B22+k49 ... I get this error: "You've
entered too many arguments for this function."

Here is the whole formula:

=IF(B28="cash",0,IF(B28="yes",E2+E3+E5+K49,IF(B28= "no",E2+E3+E4,+E5+K49,IF(B28="neither",E2+E3+E4+E5 +B19+B22+k49))))



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
Count occurances of multiple arguments TARS1 Excel Discussion (Misc queries) 6 July 19th 06 05:13 PM
Please, need help with multiple "if" conditions Ron M. Excel Discussion (Misc queries) 5 October 21st 05 08:24 PM
Multiple vlookup arguments ichall Excel Worksheet Functions 2 October 19th 05 10:47 PM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
XML / parent with multiple children and with multiple children Richard Excel Discussion (Misc queries) 0 January 5th 05 11:49 AM


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