Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default worksheet function for aggregating information

I'm looking for a function (or macro) that can look at all cells in a single
column between variable row numbers--variable in that the row numbers are
dependent on information in a different column--and gives a one or zero
depending on whether there are non-zero numbers in the range (that the
function targets). Here is an illustration of what I am looking for:

Center passes raw numbers What I am looking for
1 0
1 0
1 2
1 2
1 0
1 0
1 0
1 2
1 2
1 2 1
2 0
2 2
2 2
2 2 1
3 0
3 0
3 0
3 0 0
4 0

The center passes always change by one, but the number of rows dedicated to
each number changes. The numbers in the 'raw number' column will always be
equal to 2. Any and all help would be much appreciated.

Thanks,
beecher


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default worksheet function for aggregating information

=IF(COUNTIF(A2:A3,A2)1,"",IF(AND(COUNTIF(A2:A3,A2 )=1,B2=0),0,1))


"beecher" wrote:

I'm looking for a function (or macro) that can look at all cells in a single
column between variable row numbers--variable in that the row numbers are
dependent on information in a different column--and gives a one or zero
depending on whether there are non-zero numbers in the range (that the
function targets). Here is an illustration of what I am looking for:

Center passes raw numbers What I am looking for
1 0
1 0
1 2
1 2
1 0
1 0
1 0
1 2
1 2
1 2 1
2 0
2 2
2 2
2 2 1
3 0
3 0
3 0
3 0 0
4 0

The center passes always change by one, but the number of rows dedicated to
each number changes. The numbers in the 'raw number' column will always be
equal to 2. Any and all help would be much appreciated.

Thanks,
beecher


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default worksheet function for aggregating information

I put this in C2:

=IF(COUNTIF($A$2:A2,A2)<COUNTIF(A:A,A2),"",
--(SUMPRODUCT(--($A$2:$A$999=A2),--($B$2:$B$999<0))0))

and dragged down the column.

Adjust those ranges (a2:a999 and b2:b999) to match--but don't use the whole
column.

beecher wrote:

I'm looking for a function (or macro) that can look at all cells in a single
column between variable row numbers--variable in that the row numbers are
dependent on information in a different column--and gives a one or zero
depending on whether there are non-zero numbers in the range (that the
function targets). Here is an illustration of what I am looking for:

Center passes raw numbers What I am looking for
1 0
1 0
1 2
1 2
1 0
1 0
1 0
1 2
1 2
1 2 1
2 0
2 2
2 2
2 2 1
3 0
3 0
3 0
3 0 0
4 0

The center passes always change by one, but the number of rows dedicated to
each number changes. The numbers in the 'raw number' column will always be
equal to 2. Any and all help would be much appreciated.

Thanks,
beecher


--

Dave Peterson
Reply
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
Link a cell from another worksheet as a result in a function? LisaLisaKK Excel Worksheet Functions 1 September 7th 06 06:47 PM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Using information from one worksheet, to rename inserted worksheet Lyn Excel Worksheet Functions 0 March 24th 06 12:54 AM
Reference the worksheet from a multiple worksheet range function ( DBickel Excel Worksheet Functions 1 May 28th 05 03:49 AM


All times are GMT +1. The time now is 01:09 PM.

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"