Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What could be the problem with this script ?
=if(if(Style='TVB' and if(DISPLAY_YEAR='2007',0,(If(DISPLAY_YEAR='2008',1,If(DISPLAY_YEAR='2009',2,If(DISPLAY_YEAR='2010',2,If(DISPLAY_YEAR='2011',3,4)))))),
if(if(Style='RY903C' and (If(DISPLAY_YEAR='2008',0,If(DISPLAY_YEAR='2009',1,If(DISPLAY_YEAR='2010',3,If(DISPLAY_YEAR='2011',4))))),
if(Style='RUSSA1' and If(DISPLAY_YEAR='2010',0,If(DISPLAY_YEAR='2011',1,If(DISPLAY_YEAR='2012',2)))
Regards
Mhatim
Hope I got correctly what you are trying to achieve:
=if(Style='TVB',if(DISPLAY_YEAR='2007',0, If(DISPLAY_YEAR='2008',1,If(DISPLAY_YEAR='2009',2,If(DISPLAY_YEAR='2010',2,If(DISPLAY_YEAR='2011',3,4))))),
if(Style='RY903C',If(DISPLAY_YEAR='2008',0,If(DISPLAY_YEAR='2009',1,If(DISPLAY_YEAR='2010',3,If(DISPLAY_YEAR='2011',4)))),
if(Style='RUSSA1',If(DISPLAY_YEAR='2010',0,If(DISPLAY_YEAR='2011',1,If(DISPLAY_YEAR='2012',2))))))
At first glance, some missing brackets (about 4-5 closing)? Then, some of your conditionals are missing a then branch, wich is mandatory.
Thanks for your response
I have changed the If statement to take care of all the conditionals however
When I complete the brackets this what I get
Red underline comes before the third bracket at the end.
Please advise.
=if(if(Style='TVB' and if(DISPLAY_YEAR='2007',0,(If(DISPLAY_YEAR='2008',1,If(DISPLAY_YEAR='2009',2,If(DISPLAY_YEAR='2010',2,If(DISPLAY_YEAR='2011',3,4)))))),
if(Style='RY903C' and (If(DISPLAY_YEAR='2008',0,If(DISPLAY_YEAR='2009',1,If(DISPLAY_YEAR='2010',3,If(DISPLAY_YEAR='2011',4))))),
if (Style='RUSSA1' and If (DISPLAY_YEAR='2010',0,If(DISPLAY_YEAR='2011',1,If(DISPLAY_YEAR='2012',2)))))))
HI
Try this,
=if(if(Style='TVB' and if(DISPLAY_YEAR='2007',0,(If(DISPLAY_YEAR='2008',1,If(DISPLAY_YEAR='2009',2,If(DISPLAY_YEAR='2010',2,If(DISPLAY_YEAR='2011',3,4))))),
if(Style='RY903C' and (If(DISPLAY_YEAR='2008',0,If(DISPLAY_YEAR='2009',1,If(DISPLAY_YEAR='2010',3,If(DISPLAY_YEAR='2011',4))))),
if (Style='RUSSA1' and If (DISPLAY_YEAR='2010',0,If(DISPLAY_YEAR='2011',1,If(DISPLAY_YEAR='2012',2))))))))
But some condition is missing in some if statement..Please fill it
Hope I got correctly what you are trying to achieve:
=if(Style='TVB',if(DISPLAY_YEAR='2007',0, If(DISPLAY_YEAR='2008',1,If(DISPLAY_YEAR='2009',2,If(DISPLAY_YEAR='2010',2,If(DISPLAY_YEAR='2011',3,4))))),
if(Style='RY903C',If(DISPLAY_YEAR='2008',0,If(DISPLAY_YEAR='2009',1,If(DISPLAY_YEAR='2010',3,If(DISPLAY_YEAR='2011',4)))),
if(Style='RUSSA1',If(DISPLAY_YEAR='2010',0,If(DISPLAY_YEAR='2011',1,If(DISPLAY_YEAR='2012',2))))))
Thanks Ramasamy,
Not able to figure out the missing ones.
Can you please help me with it.
Regards.
Mhatim
Should you start with two if's (i never do)
=if(Style='TVB' and DISPLAY_YEAR='2007',0,
etc
its
if(a=b and / or c=b etc,then (may include an if), else (may include an if)
if you have more than one if statement the brackets are all maybe closed at the end not part way through
not
If(DISPLAY_YEAR='2011',3,4)))))),
try dropping all if if statement
I don't think this will work at any point in the formula
if(if(Style='RY903C' and
its always if,then,else not if(if
I believe