Fitting different lengthened intervals together

alanlambden

Board Regular
Joined
Nov 20, 2014
Messages
73
Hi,

I am hoping to get some help with some excel arithmetic. This is quite a difficult issue to explain. My VBA coding is fairly rudimentary too so I was hoping to crack this problem in the cells.

I'm working with drillhole data. I have two sets of data that I need to calculate some ratios based on a column in each dataset and converge into one column.

The first is the sampling intervals. Shown here on the left. These are the interval that are sent to the lab for analysis. We happen to be analyzing rock for gold. Below you can see that from between 0-24.1m we had 12 samples. Most of them were around 2m wide, some are slightly larger and some are smaller.
The second set of data is what we call in the industry as 'recovery'. This is when we estimate how much of the rock was intact after being extracted from the ground. For example if we pull up a 1m sample and the rock is solid with no breaks, thats 100%. If the drilling intercepts a fault or a highly weathered piece, it is likely that the rock will be crumbly and less-than-intact. We use a technique to measure how much rock is there against how much should be there and assign it a percentage. So after measuring the interval and there is only 75cm of intact rock and the rest is mud/sand or whatever, that would get assigned a 75% recovery.

You can see below that there were many more recovery intervals taken than sample intervals. What I would like to do is assign each sample interval a recovery percentage, calculated from the actual recovery data. That would mean some arithmetic to adjust the ratios of each recovery interval to fit into the sample interval.

So the first sample interval 0-0.4 would be assigned 100% because the first interval in the recovery(%) data envelops this interval completely and exactly. The 0.3m that stretches into the next sample interval, must then be weighted (.3m x 100%) and added to the next recovery interval (1.2m x 45.8% - the 1.2m being the total length of the interval 1.9m - .7m). The sampling interval 0.4m - 3.4m must be satisfied with all the remaining recoveries. So then the code must also add (0.6m (because 2.5m-1.9m) X 66.6% ) and (0.5m (because 3m-2.5m) x 100%) and then the final recovery falls nicely on 3.4m so we must add (0.4m x 100%) adding all these weighted recoverys up and then divide by the sample length will give us the amalgamated recovery for the interval.....and then proceed to the next sample interval and fitting the recoveries in accordingly. Here is the arithmetic for the second interval...but I am having a lot of trouble getting excel to do this for me.

.3m x 100% = 30
1.2m x 45.8% = 55
0.6m X 66.6% = 40
0.5m x 100% = 50
0.4m x 100% = 40

30 + 55 + 40 + 50 + 40 = 215/3m = 71.7%. I want to populate the remaining cells in the 'adjusted recovery' column.

Sorry if I made it sound really complicated!



Code:
[TABLE="width: 747"]
<tbody>[TR]
[TD="colspan: 3"]Sampling intervals[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]Recovery[/TD]
[/TR]
[TR]
[TD]Hole #[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]length[/TD]
[TD="colspan: 2"]Adjusted recovery[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]length[/TD]
[TD]Recovery (%)[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0.4[/TD]
[TD="align: right"]0.4[/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]0.4[/TD]
[TD="align: right"]3.4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]71.7[/TD]
[TD][/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]1.9[/TD]
[TD="align: right"]1.2[/TD]
[TD="align: right"]45.8[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]3.4[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]2.6[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1.9[/TD]
[TD="align: right"]2.5[/TD]
[TD="align: right"]0.6[/TD]
[TD="align: right"]66.7[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]8.1[/TD]
[TD="align: right"]2.1[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2.5[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]8.1[/TD]
[TD="align: right"]10.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3.4[/TD]
[TD="align: right"]0.4[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]10.1[/TD]
[TD="align: right"]12.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3.4[/TD]
[TD="align: right"]4.05[/TD]
[TD="align: right"]0.65[/TD]
[TD="align: right"]96.9[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]12.1[/TD]
[TD="align: right"]14.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4.05[/TD]
[TD="align: right"]4.7[/TD]
[TD="align: right"]0.65[/TD]
[TD="align: right"]53.8[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]14.1[/TD]
[TD="align: right"]16.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4.7[/TD]
[TD="align: right"]5.55[/TD]
[TD="align: right"]0.85[/TD]
[TD="align: right"]82.4[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]16.1[/TD]
[TD="align: right"]18.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5.55[/TD]
[TD="align: right"]6.4[/TD]
[TD="align: right"]0.85[/TD]
[TD="align: right"]94.1[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]18.1[/TD]
[TD="align: right"]20.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]6.4[/TD]
[TD="align: right"]7.25[/TD]
[TD="align: right"]0.85[/TD]
[TD="align: right"]94.1[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]20.1[/TD]
[TD="align: right"]22.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7.25[/TD]
[TD="align: right"]8.05[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD]DH-001[/TD]
[TD="align: right"]22.1[/TD]
[TD="align: right"]24.1[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]8.05[/TD]
[TD="align: right"]9.2[/TD]
[TD="align: right"]1.15[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]9.2[/TD]
[TD="align: right"]10.3[/TD]
[TD="align: right"]1.1[/TD]
[TD="align: right"]90.9[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]10.3[/TD]
[TD="align: right"]11.3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]11.3[/TD]
[TD="align: right"]12.8[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]96.7[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]12.8[/TD]
[TD="align: right"]14.3[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]14.3[/TD]
[TD="align: right"]15.8[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]15.8[/TD]
[TD="align: right"]17.3[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]17.3[/TD]
[TD="align: right"]18.8[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]18.8[/TD]
[TD="align: right"]19.9[/TD]
[TD="align: right"]1.1[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]19.9[/TD]
[TD="align: right"]20.6[/TD]
[TD="align: right"]0.7[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20.6[/TD]
[TD="align: right"]21.4[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]21.4[/TD]
[TD="align: right"]22.9[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]22.9[/TD]
[TD="align: right"]24.1[/TD]
[TD="align: right"]1.2[/TD]
[TD="align: right"]100.0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Maybe this...


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][td="bgcolor: #DCE6F1"]
H
[/td][td="bgcolor: #DCE6F1"]
I
[/td][td="bgcolor: #DCE6F1"]
J
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Sampling intervals​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
Recovery​
[/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Hole #​
[/td][td]
From​
[/td][td]
To​
[/td][td]
length​
[/td][td]
Adjusted recovery​
[/td][td][/td][td]
From​
[/td][td]
To​
[/td][td]
length​
[/td][td]
Recovery (%)​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
DH-001​
[/td][td]
0​
[/td][td]
0,4​
[/td][td]
0,4​
[/td][td]
100,0​
[/td][td][/td][td]
0​
[/td][td]
0,7​
[/td][td]
0,7​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
DH-001​
[/td][td]
0,4​
[/td][td]
3,4​
[/td][td]
3​
[/td][td]
71,7​
[/td][td][/td][td]
0,7​
[/td][td]
1,9​
[/td][td]
1,2​
[/td][td]
45,8​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
DH-001​
[/td][td]
3,4​
[/td][td]
6​
[/td][td]
2,6​
[/td][td]
80,9​
[/td][td][/td][td]
1,9​
[/td][td]
2,5​
[/td][td]
0,6​
[/td][td]
66,7​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
DH-001​
[/td][td]
6​
[/td][td]
8,1​
[/td][td]
2,1​
[/td][td]
96,5​
[/td][td][/td][td]
2,5​
[/td][td]
3​
[/td][td]
0,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
DH-001​
[/td][td]
8,1​
[/td][td]
10,1​
[/td][td]
2​
[/td][td]
95,9​
[/td][td][/td][td]
3​
[/td][td]
3,4​
[/td][td]
0,4​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td]
DH-001​
[/td][td]
10,1​
[/td][td]
12,1​
[/td][td]
2​
[/td][td]
97,8​
[/td][td][/td][td]
3,4​
[/td][td]
4,05​
[/td][td]
0,65​
[/td][td]
96,9​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
9
[/td][td]
DH-001​
[/td][td]
12,1​
[/td][td]
14,1​
[/td][td]
2​
[/td][td]
98,8​
[/td][td][/td][td]
4,05​
[/td][td]
4,7​
[/td][td]
0,65​
[/td][td]
53,8​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
10
[/td][td]
DH-001​
[/td][td]
14,1​
[/td][td]
16,1​
[/td][td]
2​
[/td][td]
100,0​
[/td][td][/td][td]
4,7​
[/td][td]
5,55​
[/td][td]
0,85​
[/td][td]
82,4​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
11
[/td][td]
DH-001​
[/td][td]
16,1​
[/td][td]
18,1​
[/td][td]
2​
[/td][td]
100,0​
[/td][td][/td][td]
5,55​
[/td][td]
6,4​
[/td][td]
0,85​
[/td][td]
94,1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
12
[/td][td]
DH-001​
[/td][td]
18,1​
[/td][td]
20,1​
[/td][td]
2​
[/td][td]
100,0​
[/td][td][/td][td]
6,4​
[/td][td]
7,25​
[/td][td]
0,85​
[/td][td]
94,1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
13
[/td][td]
DH-001​
[/td][td]
20,1​
[/td][td]
22,1​
[/td][td]
2​
[/td][td]
100,0​
[/td][td][/td][td]
7,25​
[/td][td]
8,05​
[/td][td]
0,8​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
14
[/td][td]
DH-001​
[/td][td]
22,1​
[/td][td]
24,1​
[/td][td]
2​
[/td][td]
100,0​
[/td][td][/td][td]
8,05​
[/td][td]
9,2​
[/td][td]
1,15​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
15
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
9,2​
[/td][td]
10,3​
[/td][td]
1,1​
[/td][td]
90,9​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
16
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
10,3​
[/td][td]
11,3​
[/td][td]
1​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
17
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
11,3​
[/td][td]
12,8​
[/td][td]
1,5​
[/td][td]
96,7​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
18
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
12,8​
[/td][td]
14,3​
[/td][td]
1,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
19
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
14,3​
[/td][td]
15,8​
[/td][td]
1,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
20
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
15,8​
[/td][td]
17,3​
[/td][td]
1,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
21
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
17,3​
[/td][td]
18,8​
[/td][td]
1,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
22
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
18,8​
[/td][td]
19,9​
[/td][td]
1,1​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
23
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
19,9​
[/td][td]
20,6​
[/td][td]
0,7​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
24
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
20,6​
[/td][td]
21,4​
[/td][td]
0,8​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
25
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
21,4​
[/td][td]
22,9​
[/td][td]
1,5​
[/td][td]
100,0​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
26
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
22,9​
[/td][td]
24,1​
[/td][td]
1,2​
[/td][td]
100,0​
[/td][/tr]
[/table]


Array formula in E3 copied down
=SUM(IF(1-((B3>$H$3:$H$26)+($G$3:$G$26>C3)),(IF($H$3:$H$26>C3,C3,$H$3:$H$26)-IF($G$3:$G$26>B3,$G$3:$G$26,B3))*$J$3:$J$26))/D3

confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
Maybe this...


[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[TD="bgcolor: #DCE6F1"]
D
[/TD]
[TD="bgcolor: #DCE6F1"]
E
[/TD]
[TD="bgcolor: #DCE6F1"]
F
[/TD]
[TD="bgcolor: #DCE6F1"]
G
[/TD]
[TD="bgcolor: #DCE6F1"]
H
[/TD]
[TD="bgcolor: #DCE6F1"]
I
[/TD]
[TD="bgcolor: #DCE6F1"]
J
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD]
Sampling intervals​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
Recovery​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD]
Hole #​
[/TD]
[TD]
From​
[/TD]
[TD]
To​
[/TD]
[TD]
length​
[/TD]
[TD]
Adjusted recovery​
[/TD]
[TD][/TD]
[TD]
From​
[/TD]
[TD]
To​
[/TD]
[TD]
length​
[/TD]
[TD]
Recovery (%)​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
DH-001​
[/TD]
[TD]
0​
[/TD]
[TD]
0,4​
[/TD]
[TD]
0,4​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
0​
[/TD]
[TD]
0,7​
[/TD]
[TD]
0,7​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
DH-001​
[/TD]
[TD]
0,4​
[/TD]
[TD]
3,4​
[/TD]
[TD]
3​
[/TD]
[TD]
71,7​
[/TD]
[TD][/TD]
[TD]
0,7​
[/TD]
[TD]
1,9​
[/TD]
[TD]
1,2​
[/TD]
[TD]
45,8​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
5
[/TD]
[TD]
DH-001​
[/TD]
[TD]
3,4​
[/TD]
[TD]
6​
[/TD]
[TD]
2,6​
[/TD]
[TD]
80,9​
[/TD]
[TD][/TD]
[TD]
1,9​
[/TD]
[TD]
2,5​
[/TD]
[TD]
0,6​
[/TD]
[TD]
66,7​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
6
[/TD]
[TD]
DH-001​
[/TD]
[TD]
6​
[/TD]
[TD]
8,1​
[/TD]
[TD]
2,1​
[/TD]
[TD]
96,5​
[/TD]
[TD][/TD]
[TD]
2,5​
[/TD]
[TD]
3​
[/TD]
[TD]
0,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
7
[/TD]
[TD]
DH-001​
[/TD]
[TD]
8,1​
[/TD]
[TD]
10,1​
[/TD]
[TD]
2​
[/TD]
[TD]
95,9​
[/TD]
[TD][/TD]
[TD]
3​
[/TD]
[TD]
3,4​
[/TD]
[TD]
0,4​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
8
[/TD]
[TD]
DH-001​
[/TD]
[TD]
10,1​
[/TD]
[TD]
12,1​
[/TD]
[TD]
2​
[/TD]
[TD]
97,8​
[/TD]
[TD][/TD]
[TD]
3,4​
[/TD]
[TD]
4,05​
[/TD]
[TD]
0,65​
[/TD]
[TD]
96,9​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
9
[/TD]
[TD]
DH-001​
[/TD]
[TD]
12,1​
[/TD]
[TD]
14,1​
[/TD]
[TD]
2​
[/TD]
[TD]
98,8​
[/TD]
[TD][/TD]
[TD]
4,05​
[/TD]
[TD]
4,7​
[/TD]
[TD]
0,65​
[/TD]
[TD]
53,8​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
10
[/TD]
[TD]
DH-001​
[/TD]
[TD]
14,1​
[/TD]
[TD]
16,1​
[/TD]
[TD]
2​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
4,7​
[/TD]
[TD]
5,55​
[/TD]
[TD]
0,85​
[/TD]
[TD]
82,4​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
11
[/TD]
[TD]
DH-001​
[/TD]
[TD]
16,1​
[/TD]
[TD]
18,1​
[/TD]
[TD]
2​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
5,55​
[/TD]
[TD]
6,4​
[/TD]
[TD]
0,85​
[/TD]
[TD]
94,1​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
12
[/TD]
[TD]
DH-001​
[/TD]
[TD]
18,1​
[/TD]
[TD]
20,1​
[/TD]
[TD]
2​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
6,4​
[/TD]
[TD]
7,25​
[/TD]
[TD]
0,85​
[/TD]
[TD]
94,1​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
13
[/TD]
[TD]
DH-001​
[/TD]
[TD]
20,1​
[/TD]
[TD]
22,1​
[/TD]
[TD]
2​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
7,25​
[/TD]
[TD]
8,05​
[/TD]
[TD]
0,8​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
14
[/TD]
[TD]
DH-001​
[/TD]
[TD]
22,1​
[/TD]
[TD]
24,1​
[/TD]
[TD]
2​
[/TD]
[TD]
100,0​
[/TD]
[TD][/TD]
[TD]
8,05​
[/TD]
[TD]
9,2​
[/TD]
[TD]
1,15​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
15
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
9,2​
[/TD]
[TD]
10,3​
[/TD]
[TD]
1,1​
[/TD]
[TD]
90,9​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
16
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
10,3​
[/TD]
[TD]
11,3​
[/TD]
[TD]
1​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
17
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
11,3​
[/TD]
[TD]
12,8​
[/TD]
[TD]
1,5​
[/TD]
[TD]
96,7​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
18
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
12,8​
[/TD]
[TD]
14,3​
[/TD]
[TD]
1,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
19
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
14,3​
[/TD]
[TD]
15,8​
[/TD]
[TD]
1,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
20
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
15,8​
[/TD]
[TD]
17,3​
[/TD]
[TD]
1,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
21
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
17,3​
[/TD]
[TD]
18,8​
[/TD]
[TD]
1,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
22
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
18,8​
[/TD]
[TD]
19,9​
[/TD]
[TD]
1,1​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
23
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
19,9​
[/TD]
[TD]
20,6​
[/TD]
[TD]
0,7​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
24
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
20,6​
[/TD]
[TD]
21,4​
[/TD]
[TD]
0,8​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
25
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
21,4​
[/TD]
[TD]
22,9​
[/TD]
[TD]
1,5​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
26
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
22,9​
[/TD]
[TD]
24,1​
[/TD]
[TD]
1,2​
[/TD]
[TD]
100,0​
[/TD]
[/TR]
</tbody>[/TABLE]


Array formula in E3 copied down
=SUM(IF(1-((B3>$H$3:$H$26)+($G$3:$G$26>C3)),(IF($H$3:$H$26>C3,C3,$H$3:$H$26)-IF($G$3:$G$26>B3,$G$3:$G$26,B3))*$J$3:$J$26))/D3

confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.


Marcelo thank you so much! the math checks out.

The only problem is that I only supplied you with 26 records and there is thousands. Each individual hole is about 200 records. So when one hole is complete then the array code would want to skip onto the next hole. But I'm happy with this and will do them manually for now!
 
Last edited:
Upvote 0
You are welcome. Glad to help.

Hope you can adapt the formula for your real scenario.

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top