Hi. I'm attaching my workbook. I have a column that has numbers. I would like a formula or macro that will give me the following: If the number in column A is lower than -10% give me 1. Then to get a 2 it needs to have risen +10% from when it got a 1.
An example to understand:
Column A and B
-3%
-12% 1
-4%
-14%
-13%
-1% 2
3%
1%
-13% 1
3% 2
10%
-17% 1
-16%
-15%
6% 2
5%
6%
Starting from A1=-3%. We are looking for a number that is lower than -10%. A2 is below -10%. So, B2 will be 1. Now we are looking for a 10% rise from when we got in. This happens at A6 so B6 will be 2. Whenever we get a 1 it has to stop looking for a -10% value. That's why B4 and B5 are not 1. So B6 is 2. Now, we start looking for a number lower than -10% again. We get this at A9. B9 has to be 1. The 10% rise happens at row 10. So B10 will be 2.
Hope you understand what I'm trying to do!
Thanks for any help!
P.S.: I have posted the same question in another forum http://www.mrexcel.com/forum/excel-q...ml#post4543231
Bookmarks