Hi All,
I have created a Table that has 11 Columns and 18 Rows, contained in this Table is number data in each cell. What I would like to do is to create a macro that can calculate
and display the number of repeated numbers in any given grouping of lines and produce the results to the right of the Tabled Data as per Attachment 1.
The macro would require input for any line combinations
I have given (3) such examples to the right of this Table:
1. In this first example I have selected Lines 1 to 3 of this table for analysis.
2. In the second example I have selected Lines 3 to 7 for analysis
3. In the third example I have selected two non consecutive lines being
Lines 8 and 17.
As mentioned the "output data" can be written to the right of the Table as per the attachment with automatic calculations on the following:
1. "No of Repeating Numbers" = This total is simply the total of all numbers appearing in the given line
So for this analysis there are 9 Numbers that have repeated in the line grouping "Lines 1 to 3"
2. "No of offset numbers" = This is the total of the repeated numbers in this line that appear in the "Offsets" Line at E2..K2
If we refer to Lines 1 to 3 analysis out of the 9 repeating numbers there are (4)numbers that appear in the "Offset" range located at E2..K2. they are 45,100,103 & 108
These numbers can be colour coded as per the attachment output.
I look forward in hearing back from someone soon.
Kind Regards
I have created a Table that has 11 Columns and 18 Rows, contained in this Table is number data in each cell. What I would like to do is to create a macro that can calculate
and display the number of repeated numbers in any given grouping of lines and produce the results to the right of the Tabled Data as per Attachment 1.
The macro would require input for any line combinations
I have given (3) such examples to the right of this Table:
1. In this first example I have selected Lines 1 to 3 of this table for analysis.
2. In the second example I have selected Lines 3 to 7 for analysis
3. In the third example I have selected two non consecutive lines being
Lines 8 and 17.
As mentioned the "output data" can be written to the right of the Table as per the attachment with automatic calculations on the following:
1. "No of Repeating Numbers" = This total is simply the total of all numbers appearing in the given line
So for this analysis there are 9 Numbers that have repeated in the line grouping "Lines 1 to 3"
2. "No of offset numbers" = This is the total of the repeated numbers in this line that appear in the "Offsets" Line at E2..K2
If we refer to Lines 1 to 3 analysis out of the 9 repeating numbers there are (4)numbers that appear in the "Offset" range located at E2..K2. they are 45,100,103 & 108
These numbers can be colour coded as per the attachment output.
I look forward in hearing back from someone soon.
Kind Regards