+ Reply to Thread
Results 1 to 2 of 2

Using Dcount on multiple fields

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Using Dcount on multiple fields

    Good Morning,

    I am trying to use a DCOUNT to return the number of records that meet two criteria.
    Criteria 1: Where Type = "N"
    Criteria 2: Where Serial number is the same

    Example (see image attached)

    I am trying to produce a select statement that will create a field "Doc_Type2" that will be used to distinguish which records I want to select by assigning a value to Doc_Type2 = 1. The records then marked with 1 will be selected using where clause.
    To determine whether the value will be 1 for Doc_Type2 I was thinking of using a DCOUNT to identify the relevant record

    I would like to bring
    The First instance where the type = N for a serial, if there are then no records with type N then select the first instance
    where type = ND for a serial and so on.

    The lookup I am performing is the same table as the records I wish to select from.

    Any ideas would be gratefully appreciated

    Thanks

    Adam
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Using Dcount on multiple fields

    dcount is good for 1 field, but for many use a query. Count in the query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple Criteria for DCount formula in excel
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2016, 05:30 PM
  2. Replies: 5
    Last Post: 11-21-2014, 10:00 PM
  3. Dcount With Multiple Columns as Criteria
    By kblaine in forum Excel General
    Replies: 6
    Last Post: 10-22-2010, 03:59 PM
  4. DCOUNT with multiple criteria
    By xvicman in forum Excel General
    Replies: 6
    Last Post: 07-28-2010, 04:28 PM
  5. Count According to Multiple Criteria. Dcount?
    By table83 in forum Excel General
    Replies: 6
    Last Post: 11-10-2009, 11:39 AM
  6. [SOLVED] Dcount with Multiple Criteria
    By conord in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-16-2006, 02:45 PM
  7. DCOUNT WITH MULTIPLE CRITERIAS
    By cltjohn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2006, 05:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1