Nested If function

Copper Contributor

Hi everyone I am in desperate need of help. I am pulling my hair out. I am trying to do a nested If statement with 49 if statements from a pull down list and at the end it says I am missing parenthesis. When I add them it says too many.

 

2 Replies
=IF(G4=Sheet2!A2,J8*56.901,IF(G4=Sheet2!A3,J8*61.316,IF(G4=Sheet2!A4,J8*67.448,IF(G4=Sheet2!A5,J8*85.842,IF(G4=Sheet2!A6,J8*91.973,IF(G4=Sheet2!A7,J8*98.105,IF(G4=Sheet2!A8,J8*122.632,IF(G4=Sheet2!A10,J8*147.158,IF(G4=Sheet2!A11,J8*153.289,IF(G4=Sheet2!A13,J8*183.949,IF(G4=Sheet2!A14,J8*187.013,IF(G4=Sheet2!A15,J8*196.211,IF(G4=Sheet2!A16,J8*202.343,,IF(G4=Sheet2!A17,J8*208.474,IF(G4=Sheet2!A18,J8*233.000,IF(G4=Sheet2!A19,J8*245.265,IF(G4=Sheet2!A20,J8*282.053,IF(G4=Sheet2!A21,J8*294.316,IF(G4=Sheet2!A22,J8*374.029,IF(G4=Sheet2!A23,J8*392.423,IF(G4=Sheet2!A24,J8*42.185,IF(G4=Sheet2!A25,J8*52.732,IF(G4=Sheet2!A26,J8*84.370,IF(G4=Sheet2!A27,J8*105.464,IF(G4=Sheet2!A28,J8*126.557,IF(G4=Sheet2!A29,J8*158,195,IF(G4=Sheet2!A30,J8*168.742,IF(G4=Sheet2!A31,J8*263.659,IF(G4=Sheet2!A32,J8*28.697,IF(G4=Sheet2!A33,J8*57.391,IF(G4=Sheet2!A34,J8*71.740,IF(G4=Sheet2!A35,J8*111.962,IF(G4=Sheet2!A36,J8*152.678,IF(G4=Sheet2!A37,J8*178.123,IF(G4=Sheet2!A38,J8*103.011,IF(G4=Sheet2!A39,J8*190.324,IF(G4=Sheet2!A40,J8*93.812,IF(G4=Sheet2!A41,J8*187.627,IF(G4=Sheet2!A44,J8*156.356,IF(G4=Sheet2!A45,J8*166.780,IF(G4=Sheet2!A46,J8*208.474,IF(G4=Sheet2!A47,J8*234.533,IF(G4=Sheet2!A48,J8*239.745,IF(G4=Sheet2!A49,J8*250.169,IF(G4=Sheet2!A50,J8*317.924,IF(G4=Sheet2!A51,J8*56.901,IF(G4=Sheet2!A52,J8*98.105,IF(G4=Sheet2!A53,J8*202.343,IF(G4=Sheet2!A54,J8*245.265,)
You have posted on the Microsoft Learn community board which is all about exams, certification and training. I am not sure what you are using but if it is Excel, then you might get a better response on the Excel community board https://techcommunity.microsoft.com/t5/excel/ct-p/Excel_Cat