Hi all,
I am not too advanced with VBA programming but i have been trying to find and alter codes that i can find to suit my purposes. It has worked well so far but i got a problem and it has me stumped. Basically i need to work through ascending interval (from and to) data.

Now if the difference within the interval is greater than 3 then i need to insert an entire row with an interval which is the maximum difference is 3. I have to keep doing this until the interval difference is less than 3. i.e if the interval is From 10 to 20, the difference between them is 10 which means i have 3 intervals of 3 and 1 interval of 1. This i have to insert 4 entire rows with the new interval From 10 to 13, 13 to 16, 16 to 19, 19 to 20.

An example is below

From to
12 16
16 18
18 19
19 20
20 28
28 30
30 40

From to
12 15
15 16
16 18
18 19
19 20
20 23
23 26
26 28
28 30
30 33
33 36
36 39
39 40

I have tried using functions in the excel sheets but it is getting too complicated for my level to piece all of it into a macro. Any help would be much appreciated.