Sotos
05-21-2019, 07:32 AM
hello everyone,
i'm new in vba and i will appreciate any help at all. i want to start adding from the top, numbers (thousands of numbers) from a column up to a certain given range and then add the next available values up to the same range and go on ..
the table looks like this and maybe this can be the results from the VBA code
type
NUMBERS
FROM
TO
RESULTS
SUM
number1
10
90
100
number 1 and number 2 and number 3 and number 5 and number 6 and number 13
100
number2
20
number 4 and number 7
100
number3
30
number 8 and number 9
100
number4
50
number 10 and number 11 and number 14 and number 18
100
number5
20
number 12 and number 15 and number 17
100
number6
10
number 16 and number 19
100
number7
50
number 20 and number 21
100
number8
60
number 22 and number 24
90
number9
40
number 23
70
number10
50
number11
20
number12
50
number13
10
number14
20
number15
30
number16
50
number17
20
number18
10
number19
50
number20
60
number21
40
number22
50
number23
70
number24
40
Thanks
i'm new in vba and i will appreciate any help at all. i want to start adding from the top, numbers (thousands of numbers) from a column up to a certain given range and then add the next available values up to the same range and go on ..
the table looks like this and maybe this can be the results from the VBA code
type
NUMBERS
FROM
TO
RESULTS
SUM
number1
10
90
100
number 1 and number 2 and number 3 and number 5 and number 6 and number 13
100
number2
20
number 4 and number 7
100
number3
30
number 8 and number 9
100
number4
50
number 10 and number 11 and number 14 and number 18
100
number5
20
number 12 and number 15 and number 17
100
number6
10
number 16 and number 19
100
number7
50
number 20 and number 21
100
number8
60
number 22 and number 24
90
number9
40
number 23
70
number10
50
number11
20
number12
50
number13
10
number14
20
number15
30
number16
50
number17
20
number18
10
number19
50
number20
60
number21
40
number22
50
number23
70
number24
40
Thanks