S
Sam via OfficeKB.com
Hi All,
Can anyone offer a VBA solution:
I have a Named Range called "Data" that spans 8 columns and 7 rows. A Numeric
Value will appear only once in a row. Each row's Numeric Values are in
ascending order. Each Numeric Criteria to be counted will be listed in Column
"A" starting at Row "2" to Row "39".
How to Count the Consecutive (2x) appearance:
A consecutive value will be in the row below the original value and in any
column; i.e. Col1 Row5 = 101 & Col2 Row6 = 101. This is a count of 1
consecutive group of 2 for Numeric Value 101.
The results will be returned down Column "C" starting at Row "2" to Row "39".
Sample Data Layout:
101 102 107 129 145 370 490 501
101 106 107 128 129 430 470 580
101 129 140 150 350 430 460 470
100 102 129 130 149 330 440 470
101 108 120 129 200 280 430 535
100 101 170 175 176 280 420 520
121 189 170 202 229 230 420 521
Expected Results: (Times Numeric Vales appear in consecutive groups of 2)
Numeric Value 101 = 1
Numeric Value 107 = 1
Numeric Value 129 = 2
Numeric Value 170 = 1
Numeric Value 430 = 1
Numeric Value 280 = 1
Numeric Value 420 = 1
NB: Numeric Value 101 - Col 1 Rows 1,2,3 is a single consecutive count of 3.
Numeric Value 470 - Cols 7,8 Rows 2,3,4 is a single consecutive count of 3.
Thanks
Sam
Can anyone offer a VBA solution:
I have a Named Range called "Data" that spans 8 columns and 7 rows. A Numeric
Value will appear only once in a row. Each row's Numeric Values are in
ascending order. Each Numeric Criteria to be counted will be listed in Column
"A" starting at Row "2" to Row "39".
How to Count the Consecutive (2x) appearance:
A consecutive value will be in the row below the original value and in any
column; i.e. Col1 Row5 = 101 & Col2 Row6 = 101. This is a count of 1
consecutive group of 2 for Numeric Value 101.
The results will be returned down Column "C" starting at Row "2" to Row "39".
Sample Data Layout:
101 102 107 129 145 370 490 501
101 106 107 128 129 430 470 580
101 129 140 150 350 430 460 470
100 102 129 130 149 330 440 470
101 108 120 129 200 280 430 535
100 101 170 175 176 280 420 520
121 189 170 202 229 230 420 521
Expected Results: (Times Numeric Vales appear in consecutive groups of 2)
Numeric Value 101 = 1
Numeric Value 107 = 1
Numeric Value 129 = 2
Numeric Value 170 = 1
Numeric Value 430 = 1
Numeric Value 280 = 1
Numeric Value 420 = 1
NB: Numeric Value 101 - Col 1 Rows 1,2,3 is a single consecutive count of 3.
Numeric Value 470 - Cols 7,8 Rows 2,3,4 is a single consecutive count of 3.
Thanks
Sam