I have a worksheet called benefits with a column Monthly Contribution. I need to bring in the employeer contribution by writing the statement below.
I was trying to write an if statement but I can only have 7 levels. How do I do this in Visual Basic.
My conditions I was using in Excel is as follows:
=IF(I2=304.99,652.05,
IF(AND(I2=84.14),"210.34",IF(AND(I2=84.13),"210.34",
IF(AND(I2=210.34),"462.74",IF(AND(I2=210.33),"462.74",
IF(AND(I2=168.26),"378.60",IF(AND(I2=305.00),"652.05",
IF(AND(I2=114.26),"285.62",IF(AND(I2=114.25),"285.62",
IF(AND(I2=285.62),"628.35",IF(AND(I2=285.61),"628.35",
IF(AND(I2=414.14),"885.40",IF(AND(I2=102.16),"255.41",
IF(AND(I2=255.42),"561.92",IF(AND(I2=204.34),"459.75",
IF(AND(I2=370.36),"791.79",IF(AND(I2=228.50),"514.10",
IF(AND(I2=228.49),"514.10")))))))))))))))))
I was trying to write an if statement but I can only have 7 levels. How do I do this in Visual Basic.
My conditions I was using in Excel is as follows:
=IF(I2=304.99,652.05,
IF(AND(I2=84.14),"210.34",IF(AND(I2=84.13),"210.34",
IF(AND(I2=210.34),"462.74",IF(AND(I2=210.33),"462.74",
IF(AND(I2=168.26),"378.60",IF(AND(I2=305.00),"652.05",
IF(AND(I2=114.26),"285.62",IF(AND(I2=114.25),"285.62",
IF(AND(I2=285.62),"628.35",IF(AND(I2=285.61),"628.35",
IF(AND(I2=414.14),"885.40",IF(AND(I2=102.16),"255.41",
IF(AND(I2=255.42),"561.92",IF(AND(I2=204.34),"459.75",
IF(AND(I2=370.36),"791.79",IF(AND(I2=228.50),"514.10",
IF(AND(I2=228.49),"514.10")))))))))))))))))