LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Count & Sum Consecutive (2x) appearance of Specific Numeric Values

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

--
Message posted via http://www.officekb.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count x2 Appearance of Numeric Value in any Row Sam via OfficeKB.com Excel Worksheet Functions 9 April 2nd 08 02:02 PM
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
Count & Sum Consecutive (2x) appearance of Specific Numeric Values Sam via OfficeKB.com Excel Worksheet Functions 2 February 5th 07 02:44 PM
Return Summed Count of Multiple Consecutive Numeric Values Sam via OfficeKB.com Excel Worksheet Functions 4 April 10th 06 10:35 PM
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM


All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"