Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default counting ROWS that have 2 criteria

jmb and stephane, I figured out how to use both of your formulas.JMB I like
yours better. Thanks a lot guys. I really appreciate it , Mike.In my
searching i found a great site for explaining SUMPRODUCT xldynamic.com
look under 'Multiple Condition tests -- Sumproduct. Good luck

"JMB" wrote:

Hard to say since you didn't post the formula you actually used. I copied it
straight from the NG into a worksheet and it worked.

Here is a slightly shorter version of the same thing. It also relies on
there not being any duplicates of m or h in the same row and assumes your
data is in A1:J100:

=SUM(--(MMULT((A1:J100="m")+(A1:J100="h"),TRANSPOSE(--(COLUMN(A1:J1)0)))=2))

or if there could be duplicates, try this slightly longer version:
=SUMPRODUCT(--(MMULT(--(A1:J100="m"),TRANSPOSE(--(COLUMN(A1:J1)0)))0),--(MMULT(--(A1:J100="h"),TRANSPOSE(--(COLUMN(A1:J1)0)))0))

both array entered (Cntrl+Shift+Enter). Stephanes formula will work and
will only requires one additional column. There may be a way to do it with
sumproduct/frequency, but I don't know how to do it and not come up w/a
formula that is longer/more complex than using MMULT (not to say it can't be
done). I've tested all of the formulas I posted and they give me the correct
answers (under the assumptions I've stated).

If you still have issues, copy the formula you are using directly from the
worksheet into your post.


"ekim notpmah" wrote:

hi, jmb tried formula, got "formula contains error" ???????????? any ideas
if I am doing something wrong? Mike

"JMB" wrote:

Relying on your statement each row has 10 *non-duplicate* letters and your
data is in A1:J100 (adjust range as needed), try this:

=SUM(--(MMULT((A1:J100="m")+(A1:J100="h"),TRANSPOSE(COLUM N(A1:J1)/COLUMN(A1:J1)))=2))

array entered with Cntrl+Shift+Enter (or you'll get #VALUE).



"ekim notpmah" wrote:

I have a chart 100 rows and 10 columns. Each row has 10 non duplicate
letters assigned to it. row 1 - eclmhitmxp row 2 - mqwerthvcx row 3
-poiuyhvcma and so forth. I need a formula to tell me how many rows have m
and h.

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
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM
Counting "rows", i.e. simultaneous criteria for multiple cells gkline Excel Worksheet Functions 2 November 19th 04 07:30 AM


All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"