jondavis1987
Active Member
- Joined
- Dec 31, 2015
- Messages
- 443
- Office Version
- 2019
- Platform
- Windows
Below is a spreadsheet that I have. Specimen is A1. Density B1. The next specimen is D1. Density E1. Specimen G1. Density H1. So the specimen numbers will always stay the same in the same spot in column A. The density numbers in column B will change. The specimens get organized into two different groups that are supposed to average as close to each other as they can. So E7 averages E2:E4 and H7 averages H2:H4. Is there a way to use vba or a function to take the specimens and in A:B and sort them automatically into two different groups in E and H that would average as close as possible? I ask because the numbers in density are not always this close and it can take a while to find the right groupings.
Specimen | Density | Specimen | Density | Specimen | Density | ||
1 | 93.2 | 1 | 93.2 | 3 | 93.3 | ||
2 | 93.4 | 2 | 93.4 | 4 | 93.5 | ||
3 | 93.3 | 6 | 93.3 | 5 | 93.4 | ||
4 | 93.5 | ||||||
5 | 93.4 | Average | Average | ||||
6 | 93.3 | 93.3 | 93.4 |