Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
thm thm is offline
external usenet poster
 
Posts: 2
Default V-lookup and Countif

I'm trying to create a formula that will look up criteria in one column and
count the result of another column. Here is some data as an example:

Fruit Have in Stock
Orange X
Pear X
Apple
Orange X
Orange
Apple X

I'm trying to create a formula that looks up "Orange" in column A and then
counts the number of "X" in column b to return a results. So my result for
Oranges should be 2 because out of the 3 listed only 2 have an "X" marked
next to it.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default V-lookup and Countif

Hi,

Try this

=SUMPRODUCT((A1:A10="Orange")*(B1:B10="X"))

In practice use cell references for the criteria

=SUMPRODUCT((A1:A10=C1B1:B10=D1))

Mike

"thm" wrote:

I'm trying to create a formula that will look up criteria in one column and
count the result of another column. Here is some data as an example:

Fruit Have in Stock
Orange X
Pear X
Apple
Orange X
Orange
Apple X

I'm trying to create a formula that looks up "Orange" in column A and then
counts the number of "X" in column b to return a results. So my result for
Oranges should be 2 because out of the 3 listed only 2 have an "X" marked
next to it.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default V-lookup and Countif

I meant

=SUMPRODUCT((A1:A10=C1)*(B1:B10=D1))


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((A1:A10="Orange")*(B1:B10="X"))

In practice use cell references for the criteria

=SUMPRODUCT((A1:A10=C1B1:B10=D1))

Mike

"thm" wrote:

I'm trying to create a formula that will look up criteria in one column and
count the result of another column. Here is some data as an example:

Fruit Have in Stock
Orange X
Pear X
Apple
Orange X
Orange
Apple X

I'm trying to create a formula that looks up "Orange" in column A and then
counts the number of "X" in column b to return a results. So my result for
Oranges should be 2 because out of the 3 listed only 2 have an "X" marked
next to it.

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
HELP! Lookup, countif or if statement Tracey Excel Worksheet Functions 3 November 25th 09 02:45 PM
Countif maybe or Lookup?? mpenkala Excel Discussion (Misc queries) 7 January 3rd 08 05:02 PM
lookup or countif Rose Davis Excel Worksheet Functions 1 October 19th 06 02:37 AM
Random and Lookup and Countif arkansas ang analysis Excel Discussion (Misc queries) 2 September 30th 05 01:15 PM
LOOKUP and COUNTIF borris Excel Worksheet Functions 5 January 19th 05 11:02 PM


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