P
patrice.cezzar
A have a set of rectangular ranges (20 rows and 5 columns) and I want
to loop through each cell, taking the values in the various cells as
inputs and populating the corresponding cell in another range with the
output.
That is to say:
inputA = Range("C7:G26")
inputB = Range("K7:O26")
output = Range("C30:G49")
The output is the result of the worksheet functions.
Assuming my function is output = A + B, I want to loop through so that:
C30.value = C7.value + K7.value
D30.value = D7.value + L7.value
....
C31.value = C8.value + K8.value
....
G49.value = G26.value + O26.value
What's the best way to achieve this?
to loop through each cell, taking the values in the various cells as
inputs and populating the corresponding cell in another range with the
output.
That is to say:
inputA = Range("C7:G26")
inputB = Range("K7:O26")
output = Range("C30:G49")
The output is the result of the worksheet functions.
Assuming my function is output = A + B, I want to loop through so that:
C30.value = C7.value + K7.value
D30.value = D7.value + L7.value
....
C31.value = C8.value + K8.value
....
G49.value = G26.value + O26.value
What's the best way to achieve this?