Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Lookup values in 2 columns, count and then multiply??? HELP!

Hi
I know it can be done but it escapes me at this stage. Please help!!!

I have a spreadsheet which looks like

A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07


I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).

Can someone help?

cheers
Debbie

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Lookup values in 2 columns, count and then multiply??? HELP!

Try this:

=SUMPRODUCT((A1:A7="Dog")*(B1:B7<""))*150

Hope this helps.

Pete

On Jul 26, 2:28 pm, DebbieV wrote:
Hi
I know it can be done but it escapes me at this stage. Please help!!!

I have a spreadsheet which looks like

A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07

I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).

Can someone help?

cheers
Debbie



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Lookup values in 2 columns, count and then multiply??? HELP!

=SUMPRODUCT(--(a2:a100="Dog"),--(b2:B100<""))*150

Better to put "Dog" in a cell:

=SUMPRODUCT(--(a2:a100=X1),--(b2:B100<""))*150

HTH

"DebbieV" wrote:

Hi
I know it can be done but it escapes me at this stage. Please help!!!

I have a spreadsheet which looks like

A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07


I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).

Can someone help?

cheers
Debbie


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Lookup values in 2 columns, count and then multiply??? HELP!

On Jul 26, 11:44 pm, Toppers
wrote:
=SUMPRODUCT(--(a2:a100="Dog"),--(b2:B100<""))*150

Better to put "Dog" in a cell:

=SUMPRODUCT(--(a2:a100=X1),--(b2:B100<""))*150

HTH



"DebbieV" wrote:
Hi
I know it can be done but it escapes me at this stage. Please help!!!


I have a spreadsheet which looks like


A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07


I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).


Can someone help?


cheers
Debbie- Hide quoted text -


- Show quoted text -


Thanks Pete - worked beautifully!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Lookup values in 2 columns, count and then multiply??? HELP!

Thanks for the feedback (although you responded to Toppers' post)

Pete

On Jul 26, 11:34 pm, DebbieV wrote:
On Jul 26, 11:44 pm, Toppers
wrote:





=SUMPRODUCT(--(a2:a100="Dog"),--(b2:B100<""))*150


Better to put "Dog" in a cell:


=SUMPRODUCT(--(a2:a100=X1),--(b2:B100<""))*150


HTH


"DebbieV" wrote:
Hi
I know it can be done but it escapes me at this stage. Please help!!!


I have a spreadsheet which looks like


A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07


I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).


Can someone help?


cheers
Debbie- Hide quoted text -


- Show quoted text -


Thanks Pete - worked beautifully!- Hide quoted text -

- Show quoted text -



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
Adding values within multiply columns Scott@CW Excel Discussion (Misc queries) 4 January 16th 07 08:54 PM
can vlookup be used to if the lookup values are in two columns? Hobbes2006 Excel Worksheet Functions 0 December 1st 06 12:23 AM
Formula to count values in two columns JBurlage Excel Discussion (Misc queries) 6 August 31st 06 12:59 PM
I would like to Count values in two columns. Roni Excel Worksheet Functions 6 June 5th 06 03:23 PM
How do I count values across multiple columns? [email protected] Excel Worksheet Functions 4 March 21st 06 11:13 PM


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