#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J. McGonigal
 
Posts: n/a
Default Calculations

I am attempting to create a function to do the following.

I have to columns of data that I need to go through. I am attempting to
talley the number of occurences of each item.

To do this I need to go through column 'a' and every time it is 1, i then
must check column 'b'. If in column b the numbers 1,3,5,6 are found then I
need to add one to the talley. Can anyone suggest a way to do this. I
attempted to use countif formula but could not get something on it to work.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Calculations

Hi!

Try this:

=SUMPRODUCT(--(A1:A20=1),--(ISNUMBER(MATCH(B1:B20,{1,3,5,6},0))))

Biff

"J. McGonigal" wrote in message
...
I am attempting to create a function to do the following.

I have to columns of data that I need to go through. I am attempting to
talley the number of occurences of each item.

To do this I need to go through column 'a' and every time it is 1, i then
must check column 'b'. If in column b the numbers 1,3,5,6 are found then I
need to add one to the talley. Can anyone suggest a way to do this. I
attempted to use countif formula but could not get something on it to
work.




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith
 
Posts: n/a
Default Calculations

The other option is to create a Pivot Table. Once you understand them, they are
very slick and very powerful. There are several sites, including
www.cpearson.com which explain Pivot Tables.

--
Regards,
Fred


"J. McGonigal" wrote in message
...
I am attempting to create a function to do the following.

I have to columns of data that I need to go through. I am attempting to
talley the number of occurences of each item.

To do this I need to go through column 'a' and every time it is 1, i then
must check column 'b'. If in column b the numbers 1,3,5,6 are found then I
need to add one to the talley. Can anyone suggest a way to do this. I
attempted to use countif formula but could not get something on it to work.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J. McGonigal
 
Posts: n/a
Default Calculations

Thanks, this worked wonderfully! Would mine explaining what the "--" do?

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(A1:A20=1),--(ISNUMBER(MATCH(B1:B20,{1,3,5,6},0))))

Biff

"J. McGonigal" wrote in message
...
I am attempting to create a function to do the following.

I have to columns of data that I need to go through. I am attempting to
talley the number of occurences of each item.

To do this I need to go through column 'a' and every time it is 1, i then
must check column 'b'. If in column b the numbers 1,3,5,6 are found then I
need to add one to the talley. Can anyone suggest a way to do this. I
attempted to use countif formula but could not get something on it to
work.





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J. McGonigal
 
Posts: n/a
Default Calculations

Thanks, I will begin to look at this in the near future.

"Fred Smith" wrote:

The other option is to create a Pivot Table. Once you understand them, they are
very slick and very powerful. There are several sites, including
www.cpearson.com which explain Pivot Tables.

--
Regards,
Fred


"J. McGonigal" wrote in message
...
I am attempting to create a function to do the following.

I have to columns of data that I need to go through. I am attempting to
talley the number of occurences of each item.

To do this I need to go through column 'a' and every time it is 1, i then
must check column 'b'. If in column b the numbers 1,3,5,6 are found then I
need to add one to the talley. Can anyone suggest a way to do this. I
attempted to use countif formula but could not get something on it to work.





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
Calculations in French - Clarification lots of questions Excel Discussion (Misc queries) 0 April 20th 06 06:43 PM
complex calculations juliadesi Excel Discussion (Misc queries) 6 March 17th 06 01:14 PM
Calculations based on PivotTable information jerry Excel Discussion (Misc queries) 0 October 3rd 05 07:25 PM
looping through a set of calculations Anand Excel Worksheet Functions 2 September 14th 05 07:12 PM
Calculations crossing multiple sheets Stephen McArthu Excel Discussion (Misc queries) 4 June 6th 05 04:35 PM


All times are GMT +1. The time now is 04:52 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"