Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
e_bone75
 
Posts: n/a
Default creating a function with multiple criteria

I am new to functions and formula. I want to write a simple formula that
will calculate the number of times a particular value occurs in a spreadsheet
using multiple criteria. I want to write a function that would calculatethe
number of times this situation is met-- how often does cvg, i, p and ch occur
in the same row.

cef i p me
cef i f me
cgs d f me
cgs d p ch
cvg d p ch
cvg i p ch
cvg i p ch

i hope this isn't too confusing... can anyone help?

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=SUMPRODUCT(--(A1:A7="cvg"),--(B1:B7="I"),--(C1:C7="p"),--(D1:D7="ch"))

Better to use cells to hold the criteria:

H1 = cvg
I1 = i
J1 = p
K1 = ch

Then:

=SUMPRODUCT(--(A1:A7=H1),--(B1:B7=I1),--(C1:C7=J1),--(D1:D7=K1))

Biff

"e_bone75" wrote in message
...
I am new to functions and formula. I want to write a simple formula that
will calculate the number of times a particular value occurs in a
spreadsheet
using multiple criteria. I want to write a function that would
calculatethe
number of times this situation is met-- how often does cvg, i, p and ch
occur
in the same row.

cef i p me
cef i f me
cgs d f me
cgs d p ch
cvg d p ch
cvg i p ch
cvg i p ch

i hope this isn't too confusing... can anyone help?



  #3   Report Post  
Lilliabeth
 
Posts: n/a
Default


There are certainly multiple ways to do this, but here is one that I
think is pretty easy to understand for an Excel beginner:

Put this in E1:
=AND(A1="cvg",B1="i",C1="p",D1="ch") This will put the word true in
the cell if all criteria are met, and the word false if they are not
all met.
Copy the formula to all the rows.

And then count the number of times the formulas returned "True" in
another cell; something like this:

=COUNTIF(E1:E200,"true")


--
Lilliabeth
------------------------------------------------------------------------
Lilliabeth's Profile: http://www.excelforum.com/member.php...o&userid=27741
View this thread: http://www.excelforum.com/showthread...hreadid=476354

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
Match function multiple items Deeds Excel Worksheet Functions 3 September 19th 05 07:52 PM
COUNTIF or SUM function (Multiple criteria) HELP!! Australia Excel Worksheet Functions 3 September 19th 05 07:39 AM
undefined function error when creating xls pivot from mdb qry andrew Excel Worksheet Functions 0 July 29th 05 07:26 PM
Sum Indirect function through multiple sheets Andre Croteau Excel Discussion (Misc queries) 2 May 6th 05 10:44 AM
If function using a list of criteria arran1180 Excel Discussion (Misc queries) 1 February 17th 05 04:31 PM


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