M
Miles
After two days of Excel/VBA self-inflicted torment, I'm certain theres
a professional in the universe who can construct the VBA code
necessary to make this practical.
The Scenario:
Column A has various numbers that identify a specific group. Multiple
instances of the same number is common in column A.
Code Objective:
A range loop (based on Column A) needs to count the number of
instances of a specific group and divide that number by 4. The result
is to be the number of cells selected in Column G, preferably the
first Column G cells within that group.
After the column G cells are selected, the SUM of selected values are
to be divided by the number of instances of the group. Utilizing the
Offset property (or perhaps something different), this value is to be
published to column H for every instance of that group.
For example:
Let's say we have 40 instances of the group 495(column A). We divide
that by 4 and have 10 as a result. Therefore, we select the first 10
cells in column G within group 495. In addition let's say that the SUM
of the selected values is 1000. As a result, for every instance of
group 495, column H will be equal to 1000.
Any advice, code snippets, complete solutions, or ideas are most
welcome.
Cordially,
Miles
a professional in the universe who can construct the VBA code
necessary to make this practical.
The Scenario:
Column A has various numbers that identify a specific group. Multiple
instances of the same number is common in column A.
Code Objective:
A range loop (based on Column A) needs to count the number of
instances of a specific group and divide that number by 4. The result
is to be the number of cells selected in Column G, preferably the
first Column G cells within that group.
After the column G cells are selected, the SUM of selected values are
to be divided by the number of instances of the group. Utilizing the
Offset property (or perhaps something different), this value is to be
published to column H for every instance of that group.
For example:
Let's say we have 40 instances of the group 495(column A). We divide
that by 4 and have 10 as a result. Therefore, we select the first 10
cells in column G within group 495. In addition let's say that the SUM
of the selected values is 1000. As a result, for every instance of
group 495, column H will be equal to 1000.
Any advice, code snippets, complete solutions, or ideas are most
welcome.
Cordially,
Miles