Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel dcount I think I am stupid

Status
Not open for further replies.

Trainingjason

Instructor
Dec 6, 2001
127
GB
I am trying to write a dcount criteria where I want multiple or's on the same field hence

Dcount("RangeofData","FieldLookedUp","Criteria")

Where criteria is

Name
Jason or Martina

Due to the amount of criteria fields it is needed on 1 line.

Any help appreciated a dumb trainer.
 
What about:

=countif(range,"James")+countif(range,"Martha")



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
and, if you have multiple field criteria, take a look at FAQ68-4725



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Jason,

I've just now created a file specifically for the situation you've described. If you email me I'll send the file via return email.

The file will demonstrate how to properly deal with "compound" formulas for database formulas like DCOUNT, DSUM, etc.

This example also demonstrates how to incorporate the "FIND" function in the criteria. This FIND function can be quite useful in situations where you want to find records where the text being searched for is contained amongst other text within a cell. In the case of a name like Martina, it potentially could be in a paragraph in one field, or perhaps under a "Name" field in a cell that contains the First, Middle and/or Last Names.

If anyone else feels you could use this example file, please don't hesitate to ask.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Hi Dale - only caveat I'd use on 'Find' is that in it's function form it's case sensitive, so 'Search' may be a better option. :)

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Thanks, Ken ;-)

You're quite right to suggest the SEARCH function. My old Lotus 123 habits still come to the surface once in a while. In Lotus FIND is not case-sensitive.

Regards, ...Dale
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top