Hi guys
I'm looking for a VBA code that does a type of multiply loop. Take a look at the sheet. The goal is: if one of the numbers in column A:A is greater than zero, the NEXT five numbers in the column L:L should be multiplied by negative one, and outputted in Y:Y. If the number in column A:A is less than zero the next five numbers in the L:L should just be outputted in Y:Y (not multiplied by negative 1). If there's no number or an N/A, the loop should just ignore these cells. The should be done with every pair (A&L, B&M, C&N, ect).
So for example, the loop will run and find a A2 populated with a negative number, so it would output L3:L7 into Y3:Y7. The loop would then start again at A8, find A12 populated with a negative number, and then output L13:L17 into Y13:L17. When the loop runs again, it will find a positive number in A:20, and will therefore multiply L21:L25 by negative one and output that into Y21:Y25. This should happen with B&M, C&N, ect
Hope I'm being clear! Any help is really appreciated!
Bookmarks