ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can you have to many arguements in a formula (https://www.excelbanter.com/excel-worksheet-functions/242381-can-you-have-many-arguements-formula.html)

CeeCee

Can you have to many arguements in a formula
 
I am atempting to add another arguement to an IF statement. I already have
eight and when I enter the additional statement I get an error

=IF(Q2=351,"Diesel",(IF(Q2=205,"Outside Svcs",(IF(q2=450,"Equip
Rntl",(IF(Q2=540,"Trans",(IF(Q2=541,"Air
Trans",(IF(Q2=542,"Motel",(IF(Q2=543,"Meals",(IF(Q 2=206,"Supply",(IF(Q2=520,"Whse Rntl","Gas")))))))))))))))))

I use this every week and may need to add more. I apply this formula to
over 2,000 rows of information.

Help !!!

Teethless mama

Can you have to many arguements in a formula
 
Create a lookup table and use VLOOKUP function


"CeeCee" wrote:

I am atempting to add another arguement to an IF statement. I already have
eight and when I enter the additional statement I get an error

=IF(Q2=351,"Diesel",(IF(Q2=205,"Outside Svcs",(IF(q2=450,"Equip
Rntl",(IF(Q2=540,"Trans",(IF(Q2=541,"Air
Trans",(IF(Q2=542,"Motel",(IF(Q2=543,"Meals",(IF(Q 2=206,"Supply",(IF(Q2=520,"Whse Rntl","Gas")))))))))))))))))

I use this every week and may need to add more. I apply this formula to
over 2,000 rows of information.

Help !!!


Glenn

Can you have to many arguements in a formula
 
CeeCee wrote:
I am atempting to add another arguement to an IF statement. I already have
eight and when I enter the additional statement I get an error

=IF(Q2=351,"Diesel",(IF(Q2=205,"Outside Svcs",(IF(q2=450,"Equip
Rntl",(IF(Q2=540,"Trans",(IF(Q2=541,"Air
Trans",(IF(Q2=542,"Motel",(IF(Q2=543,"Meals",(IF(Q 2=206,"Supply",(IF(Q2=520,"Whse Rntl","Gas")))))))))))))))))

I use this every week and may need to add more. I apply this formula to
over 2,000 rows of information.

Help !!!



Take a look at this:

http://www.contextures.com/xlFunctions02.html

Glenn

Can you have to many arguements in a formula
 
CeeCee wrote:
I am atempting to add another arguement to an IF statement. I already have
eight and when I enter the additional statement I get an error

=IF(Q2=351,"Diesel",(IF(Q2=205,"Outside Svcs",(IF(q2=450,"Equip
Rntl",(IF(Q2=540,"Trans",(IF(Q2=541,"Air
Trans",(IF(Q2=542,"Motel",(IF(Q2=543,"Meals",(IF(Q 2=206,"Supply",(IF(Q2=520,"Whse Rntl","Gas")))))))))))))))))

I use this every week and may need to add more. I apply this formula to
over 2,000 rows of information.

Help !!!



To answer the question in your Subject, this is from the help file under "IF
worksheet function":

Up to seven IF functions can be nested as value_if_true and value_if_false
arguments to construct more elaborate tests.

Sam Wilson

Can you have to many arguements in a formula
 
=IF(ISNA(VLOOKUP(Q2,{351,205,450,540,541,542,543,2 06,520;"Diesel","Outside
Svcs","Equip Rntl","Trans","Air Trans","Motel","Meals","Supply","Whse
Rntl"},2,FALSE)),"Gas",VLOOKUP(Q2,{351,205,450,540 ,541,542,543,206,520;"Diesel","Outside
Svcs","Equip Rntl","Trans","Air Trans","Motel","Meals","Supply","Whse
Rntl"},2,FALSE))

Works!

"CeeCee" wrote:

I am atempting to add another arguement to an IF statement. I already have
eight and when I enter the additional statement I get an error

=IF(Q2=351,"Diesel",(IF(Q2=205,"Outside Svcs",(IF(q2=450,"Equip
Rntl",(IF(Q2=540,"Trans",(IF(Q2=541,"Air
Trans",(IF(Q2=542,"Motel",(IF(Q2=543,"Meals",(IF(Q 2=206,"Supply",(IF(Q2=520,"Whse Rntl","Gas")))))))))))))))))

I use this every week and may need to add more. I apply this formula to
over 2,000 rows of information.

Help !!!



All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com