My DB has monthly percentages. I want to compare sequential percentages and if they are negative multiple together to find max consecutive negative months.
I can do this in multiple steps in excel, by doing an if statement and making all positive values =1 and then doing another column of ifs where it compares the line above and and if less than one than multiples row with row above.
example
M1 -5%
M2 1%
M3 -4%
M4 -6%
M5 1%
want this to return (.96*.94-1)*100 which is -9.76
or in another example
M1 -10%
M2 1%
M3 -4%
M4 -6%
M5 1%
this should just return -10 as that is the most negative consecutive month
any ideas on how to do this in access/vba?
I can do this in multiple steps in excel, by doing an if statement and making all positive values =1 and then doing another column of ifs where it compares the line above and and if less than one than multiples row with row above.
example
M1 -5%
M2 1%
M3 -4%
M4 -6%
M5 1%
want this to return (.96*.94-1)*100 which is -9.76
or in another example
M1 -10%
M2 1%
M3 -4%
M4 -6%
M5 1%
this should just return -10 as that is the most negative consecutive month
any ideas on how to do this in access/vba?