Hi.
I have a worksheet containing various values and I am trying to make a sub that would loop through two specific columns at the same time, take the two adjacent values, execute a calculation within the VBA and then, put the result back in a third column. My data is on column K and column L, from rows 9 to 25. Each of the K column value, should join the corresponding value of column L as a pair and the result should go in column M.
For example, K9 is a pair with L9, K10 with L10 and so on. These "pairs" should be entered in the module as temporary entry values for performing a calculation that is already set up, then the result should be going on the respective row, on column M. Can someone help me on setting this up? I have no experience on Loops and Arrays up to now and I think that's the only way to do that. I need to find how to loop and get the values of two columns, how to refer to those valus from the module and how to send the result back to the third column. Thanks in advance and sorry if I am not too clear, It's my first post ever asking for guidance.
I have a worksheet containing various values and I am trying to make a sub that would loop through two specific columns at the same time, take the two adjacent values, execute a calculation within the VBA and then, put the result back in a third column. My data is on column K and column L, from rows 9 to 25. Each of the K column value, should join the corresponding value of column L as a pair and the result should go in column M.
For example, K9 is a pair with L9, K10 with L10 and so on. These "pairs" should be entered in the module as temporary entry values for performing a calculation that is already set up, then the result should be going on the respective row, on column M. Can someone help me on setting this up? I have no experience on Loops and Arrays up to now and I think that's the only way to do that. I need to find how to loop and get the values of two columns, how to refer to those valus from the module and how to send the result back to the third column. Thanks in advance and sorry if I am not too clear, It's my first post ever asking for guidance.