Solved

# Help with a long if then else statement in Excel using VBA

Posted on 2012-03-26

I am hoping this will be decently easy for you experts!! I have an excel formula that already exists in my spreadsheet. The problem that I am having is that I need to add quite a bit more logic to it. I have a variable named months this is tied to a spreadsheet in the workbook.. "bookmarks" is the name. Here is the formula now..

=IF(ISNA(VLOOKUP(Years,Bookmarks!C39:D43,2)),1,VLOOKUP(Years,Bookmarks!C39:D43,2))

I need to add to this formula

If month (- this is the variable name) =

0 to 11 then 0

12 to 18 then 1

19 to 30 then 1.5

31 to 42 then 2

43 to 54 then 2.5

55 to 60 then 4

can someone help me with this?? Pretty Please??