ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Error in if condition (https://www.excelbanter.com/excel-worksheet-functions/181646-error-if-condition.html)

Christopher Naveen[_2_]

Error in if condition
 
Hi,

I am not getting the result for the below mentioned formula. I request any
one of you to help me in resolving the error.

Error : "You have entered too many arguments for this function"

Formula : =IF(ISERROR(VLOOKUP(CB2,Master!$G:$H,2,0)),IF(VLOO KUP('Base
Data'!G2,Master!$E:$F,2,0)="AS",VLOOKUP('Base
Data'!I2,Master!$A:$C,3,0),IF(VLOOKUP('Base
Data'!G2,Master!$E:$F,2,0)="CS",VLOOKUP('Base
Data'!I2,Master!$A:$D,4,0)),VLOOKUP(CB2,Master!$G: $H,2,0))

Also pls tell me I have 3 nested if conditions here. So I will have 3 false
values accordingly. 1st false value shud be closed at first or last (at the
end of the formual)

Ex : if(1,X,2,Y,3,Z,3,1) or if(1,X,2,Y,3,Z,1,3)

-Christ

Bernie Deitrick

Error in if condition
 
Christopher,

This is a valid formula:

=IF(ISERROR(VLOOKUP(CB2,Master!$G:$H,2,0)),IF(VLOO KUP('Base
Data'!G2,Master!$E:$F,2,0)="AS",VLOOKUP('Base Data'!I2,Master!$A:$C,3,0),IF(VLOOKUP('Base
Data'!G2,Master!$E:$F,2,0)="CS",VLOOKUP('Base
Data'!I2,Master!$A:$D,4,0),VLOOKUP(CB2,Master!$G:$ H,2,0))))

But only you can tell if the logic is correct....

HTH,
Bernie
MS Excel MVP


"Christopher Naveen" wrote in message
...
Hi,

I am not getting the result for the below mentioned formula. I request any
one of you to help me in resolving the error.

Error : "You have entered too many arguments for this function"

Formula : =IF(ISERROR(VLOOKUP(CB2,Master!$G:$H,2,0)),IF(VLOO KUP('Base
Data'!G2,Master!$E:$F,2,0)="AS",VLOOKUP('Base
Data'!I2,Master!$A:$C,3,0),IF(VLOOKUP('Base
Data'!G2,Master!$E:$F,2,0)="CS",VLOOKUP('Base
Data'!I2,Master!$A:$D,4,0)),VLOOKUP(CB2,Master!$G: $H,2,0))

Also pls tell me I have 3 nested if conditions here. So I will have 3 false
values accordingly. 1st false value shud be closed at first or last (at the
end of the formual)

Ex : if(1,X,2,Y,3,Z,3,1) or if(1,X,2,Y,3,Z,1,3)

-Christ





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

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