![]() |
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 !!! |
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 !!! |
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 |
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. |
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