Hi
In Cricket Sports there are 6 legal balls a bowler bowls towards the batsman. Those 6 balls are called an over.
So, the sequence of the balls are counted as follows.
1 ball = 0.1 overs
2 balls = 0.2 overs
3 balls = 0.3 overs
4 balls = 0.4 overs
5 balls = 0.5 overs
6 balls = 1 over
7 balls = 1.1 overs
8 balls = 1.2 overs
9 balls = 1.3 overs
10 balls = 1.4 overs
11 balls = 1.5 overs
12 balls = 2 overs
13 balls = 2.1 overs
and so on
In multiple occasion while working with cricket scores, we need to add two overs scores such as 1.3 (9 balls) and 2.5 (17 balls)
Excel adds up this to 3.8, but we need it to be 4.2.
In 1.3 there are 9 balls and in 2.5 there are 17 balls.
Altogether there 26 balls which which is 4 overs (24 balls) and 0.2 overs (2 balls).
So, I want a VBA function that accepts parameters. As parameters I will inject individual overs and the function should return the sum of those overs.
For example;
=AddOvers(2.3,5.2,1.4,3) should return 12.3
It would be great if this function can take parameters in comma separated values or a given range of values exactly as SUM function takes.
In Cricket Sports there are 6 legal balls a bowler bowls towards the batsman. Those 6 balls are called an over.
So, the sequence of the balls are counted as follows.
1 ball = 0.1 overs
2 balls = 0.2 overs
3 balls = 0.3 overs
4 balls = 0.4 overs
5 balls = 0.5 overs
6 balls = 1 over
7 balls = 1.1 overs
8 balls = 1.2 overs
9 balls = 1.3 overs
10 balls = 1.4 overs
11 balls = 1.5 overs
12 balls = 2 overs
13 balls = 2.1 overs
and so on
In multiple occasion while working with cricket scores, we need to add two overs scores such as 1.3 (9 balls) and 2.5 (17 balls)
Excel adds up this to 3.8, but we need it to be 4.2.
In 1.3 there are 9 balls and in 2.5 there are 17 balls.
Altogether there 26 balls which which is 4 overs (24 balls) and 0.2 overs (2 balls).
So, I want a VBA function that accepts parameters. As parameters I will inject individual overs and the function should return the sum of those overs.
For example;
=AddOvers(2.3,5.2,1.4,3) should return 12.3
It would be great if this function can take parameters in comma separated values or a given range of values exactly as SUM function takes.