Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 115
Default What function to use to return the no. of same value by mths

Hi

Can anyone advise which excel function should I use to return the desired
results? i.e. to count the no. of times e.g. computer components appear in
the month of Apr?

I am using a interactive worksheet i.e. if I changes the month to e.g. Jun
in worksheet 2, the count should also changes.

I tried countif and counta but it is not the desired result I am looking at
cos when the month changes in worksheet 2, the count is not updated.

Example
Worksheet 1
Product cat Product Apr May
Jun......
Computer components Mouse 5 10
Computer software Windows 97 4
Computer components Keyboard 5

Worksheet 2
Product cat Apr
Computer components 2
Computer software 1

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default What function to use to return the no. of same value by mths

=SUMPRODUCT(--(Sheet1!$A$2:$A$20=Sheet2!$A2),--(Sheet1!C$2:C$20<""))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Carol" wrote in message
...
Hi

Can anyone advise which excel function should I use to return the desired
results? i.e. to count the no. of times e.g. computer components appear in
the month of Apr?

I am using a interactive worksheet i.e. if I changes the month to e.g. Jun
in worksheet 2, the count should also changes.

I tried countif and counta but it is not the desired result I am looking
at
cos when the month changes in worksheet 2, the count is not updated.

Example
Worksheet 1
Product cat Product Apr May
Jun......
Computer components Mouse 5 10
Computer software Windows 97 4
Computer components Keyboard 5

Worksheet 2
Product cat Apr
Computer components 2
Computer software 1

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 115
Default What function to use to return the no. of same value by mths



"Bob Phillips" wrote:

=SUMPRODUCT(--(Sheet1!$A$2:$A$20=Sheet2!$A2),--(Sheet1!C$2:C$20<""))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Carol" wrote in message
...
Hi

Can anyone advise which excel function should I use to return the desired
results? i.e. to count the no. of times e.g. computer components appear in
the month of Apr?

I am using a interactive worksheet i.e. if I changes the month to e.g. Jun
in worksheet 2, the count should also changes.

I tried countif and counta but it is not the desired result I am looking
at
cos when the month changes in worksheet 2, the count is not updated.

Example
Worksheet 1
Product cat Product Apr May
Jun......
Computer components Mouse 5 10
Computer software Windows 97 4
Computer components Keyboard 5

Worksheet 2
Product cat Apr
Computer components 2
Computer software 1

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 115
Default What function to use to return the no. of same value by mths

Hi Bob

Thanks for the quick reponse.

I tried your formula below but error message returned "#VALUE!"

And system auto correct the error to
=SUMPRODUCT(Sheet1!$A$2:$A$20=Sheet2!$A2)*(Sheet1! C$2:C$20<"") but still
incorrect.

May I know where could be the possible error?

Thanks
Carol

"Bob Phillips" wrote:

=SUMPRODUCT(--(Sheet1!$A$2:$A$20=Sheet2!$A2),--(Sheet1!C$2:C$20<""))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Carol" wrote in message
...
Hi

Can anyone advise which excel function should I use to return the desired
results? i.e. to count the no. of times e.g. computer components appear in
the month of Apr?

I am using a interactive worksheet i.e. if I changes the month to e.g. Jun
in worksheet 2, the count should also changes.

I tried countif and counta but it is not the desired result I am looking
at
cos when the month changes in worksheet 2, the count is not updated.

Example
Worksheet 1
Product cat Product Apr May
Jun......
Computer components Mouse 5 10
Computer software Windows 97 4
Computer components Keyboard 5

Worksheet 2
Product cat Apr
Computer components 2
Computer software 1

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default What function to use to return the no. of same value by mths

Your first clue should have been the autocorrecting. Enter the formula as
Bob posted (the easiest way is to copy and paste it, rather than typing it
in). Also, you will need to adjust the ranges in the formula to suit your
situation.

Regards,
Fred.

"Carol" wrote in message
...
Hi Bob

Thanks for the quick reponse.

I tried your formula below but error message returned "#VALUE!"

And system auto correct the error to
=SUMPRODUCT(Sheet1!$A$2:$A$20=Sheet2!$A2)*(Sheet1! C$2:C$20<"") but still
incorrect.

May I know where could be the possible error?

Thanks
Carol

"Bob Phillips" wrote:

=SUMPRODUCT(--(Sheet1!$A$2:$A$20=Sheet2!$A2),--(Sheet1!C$2:C$20<""))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Carol" wrote in message
...
Hi

Can anyone advise which excel function should I use to return the
desired
results? i.e. to count the no. of times e.g. computer components appear
in
the month of Apr?

I am using a interactive worksheet i.e. if I changes the month to e.g.
Jun
in worksheet 2, the count should also changes.

I tried countif and counta but it is not the desired result I am
looking
at
cos when the month changes in worksheet 2, the count is not updated.

Example
Worksheet 1
Product cat Product Apr May
Jun......
Computer components Mouse 5 10
Computer software Windows 97 4
Computer components Keyboard 5

Worksheet 2
Product cat Apr
Computer components 2
Computer software 1

Thanks





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
Return value for a function. Jeff Excel Discussion (Misc queries) 1 June 2nd 08 09:08 PM
How do I select same day of month, 3 mths apart when day 31 of mth JohnNZ Excel Discussion (Misc queries) 7 May 25th 06 10:25 AM
Convert hrs into # of yrs/mths/days dkuz Excel Discussion (Misc queries) 3 February 14th 06 05:30 PM
Only do Sum function if not "0", IF"0" then return "0" Mike Punko Excel Worksheet Functions 1 June 1st 05 12:20 AM
Function to return value from each tab Steven Leuck Excel Worksheet Functions 1 March 3rd 05 04:11 AM


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