L
Lotto
I have a really long set of nested ifs that I need to do something
with. I tested with less statements, and it worked great, Now with
all the statements it is too long (gives me an error).
I thought a select case statement would work, or maybe there is a much
easier way to get what I need. I have no idea how to get this in a
function and working. Below is what I;m trying to do.Can anyone
help me?
Bracket1:
(IIf([A]![1]=![P3],1,
(IIf([A]![10]=![P3],10,
IIf([A]![30]=![P3],30,
IIf([A]![50]=![P3],50,
IIf([A]![200]=![P3],200,
(IIf([A]![300]=![P3],300,
IIf([A]![400]=![P3],400,
IIf([A]![500]=![P3],500,
IIf([A]![600]=![P3],600,
IIf([A]![650]=![P3],650,
IIf([A]![700]=![P3],700,
IIf([A]![1000]=![P3],1000,
(IIf([A]![1200]=![P3],1200,
IIf([A]![1500]=![P3],1500,
else 0)))))))))))))))
with. I tested with less statements, and it worked great, Now with
all the statements it is too long (gives me an error).
I thought a select case statement would work, or maybe there is a much
easier way to get what I need. I have no idea how to get this in a
function and working. Below is what I;m trying to do.Can anyone
help me?
Bracket1:
(IIf([A]![1]=![P3],1,
(IIf([A]![10]=![P3],10,
IIf([A]![30]=![P3],30,
IIf([A]![50]=![P3],50,
IIf([A]![200]=![P3],200,
(IIf([A]![300]=![P3],300,
IIf([A]![400]=![P3],400,
IIf([A]![500]=![P3],500,
IIf([A]![600]=![P3],600,
IIf([A]![650]=![P3],650,
IIf([A]![700]=![P3],700,
IIf([A]![1000]=![P3],1000,
(IIf([A]![1200]=![P3],1200,
IIf([A]![1500]=![P3],1500,
else 0)))))))))))))))