How to select a derived range of rows and then apply simple math to them
Me, not being a pro at excel, don't really know what nomenclature to use
to describe what exactly I need to do.
I am trying to make a button macro that will take in a few settings values
(eg. maximum cost value, number of rows to output, etc..).
Following this, it will move to sheet two and pull in (select?) the data
from a number of rows (that will change in number over time). The # of
columns to pull in will remain the same however.
Visually:
Row 1 value1 value2 value3
Row 2 value1 value2 ...
Select rows 1 and 2, select all values in the columns to the right.
Once this information is selected, I then want to apply a multipler to
some of the values on each row (the multipliers come from a small
"settings" location... Column A1 row 20 to Column A1 row 25... 6 columns
each). The multiplier rows and the columns in the selected data do not
exactly corrospond.. one multiplier should be applied to 8 of the selected
columns while another will only be applied to one column.
The row that the multipliers will be applied to is randomly selected.
After applying the multipliers to this random row, I take that row only,
and paste it onto the active cell on sheet 1. If, in the settings, more
then 1 output row is set, the macro would then repeat the process and
paste another row 1 row below the active cell on sheet 1.. and this
continues until all the rows are outputted.
No comments:
Post a Comment