[TABLE="width: 500"]
<tbody>[TR]
[TD]INCREMENT[/TD]
[TD]STATIC 1[/TD]
[TD]STATIC 2[/TD]
[TD]VALUE[/TD]
[/TR]
[TR]
[TD].25
[/TD]
[TD]100[/TD]
[TD]100.35[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].45[/TD]
[TD]200[/TD]
[TD]201.55[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].65[/TD]
[TD]300[/TD]
[TD]302.75[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm struggling to figure out in VBA the most efficient way to create a loop/array within the value in the STATIC 1 column using the increment in same row, and then rounding the STATIC 2 value in same row to nearest element within the loop/array to derive the desired VALUE in blank column.
Example loop/array for first row with .25 increment and 100:
99.25 99.50 99.75 100 100.25 100.50 100.75
Rounding the 100.35 to nearest element of 100.25, thus making 100.25 the desired value in blank cell
And so on for additional rows creating the loops/arrays based on coinciding increments
<tbody>[TR]
[TD]INCREMENT[/TD]
[TD]STATIC 1[/TD]
[TD]STATIC 2[/TD]
[TD]VALUE[/TD]
[/TR]
[TR]
[TD].25
[/TD]
[TD]100[/TD]
[TD]100.35[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].45[/TD]
[TD]200[/TD]
[TD]201.55[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].65[/TD]
[TD]300[/TD]
[TD]302.75[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm struggling to figure out in VBA the most efficient way to create a loop/array within the value in the STATIC 1 column using the increment in same row, and then rounding the STATIC 2 value in same row to nearest element within the loop/array to derive the desired VALUE in blank column.
Example loop/array for first row with .25 increment and 100:
99.25 99.50 99.75 100 100.25 100.50 100.75
Rounding the 100.35 to nearest element of 100.25, thus making 100.25 the desired value in blank cell
And so on for additional rows creating the loops/arrays based on coinciding increments