+ Reply to Thread
Results 1 to 8 of 8

dsum to caculate quantity of rows within a range criteria

  1. #1
    Registered User
    Join Date
    12-13-2014
    Location
    New England
    MS-Off Ver
    2008
    Posts
    8

    dsum to caculate quantity of rows within a range criteria

    I have successfully used dsum to define a data table, set a criteria and sum certain fields.
    Criteria is the month field.
    We also need to know how many rows of each month there are inputted.
    Currently we are manually adding up the number of inputs for each month and just typing that in.

    Is there a way to have dsum do this?


    Many Thanks


    Scotty

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: dsum to caculate quantity of rows within a range criteria

    I have not had too much time with the database formulas, I connect to tables in my databases and perform reports off that... but I imagine DCount will give you the ability to count the same items your doing with DSum
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    12-13-2014
    Location
    New England
    MS-Off Ver
    2008
    Posts
    8

    Re: dsum to caculate quantity of rows within a range criteria

    DCount worked.


    Thanks


    Scotty

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: dsum to caculate quantity of rows within a range criteria

    Have you considered using sumif/S() and countif?S() for this instead?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    12-13-2014
    Location
    New England
    MS-Off Ver
    2008
    Posts
    8

    Re: dsum to caculate quantity of rows within a range criteria

    sumif/S() and countif?S()
    This is the initial formula explained to me by my brothers who have been using excel for many years.
    I haven't given up on wrapping my head around this formula but as of yet I can only get dsum to work for me.


    Scotty

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: dsum to caculate quantity of rows within a range criteria

    here is a small sample (hope it comed thtough)

    TL 1
    TL 2
    PT 8
    PT 29
    PT 0
    TL 10
    TL 11
    TL 36
    PT 9
    AB 50

    SUMIF COUNTIF AVERAGEIF
    TL 60 5 12
    PT 46 4 11.5
    AB 50 1 50
    OK the last part didnt come through too well, but
    60=SUMIF($A$2:$A$11,$A14,$B$2:$B$11)
    5=COUNTIF($A$2:$A$11,$A14)
    12=AVERAGEIF($A$2:$A$11,$A14,$B$2:$B$11)
    all copied down

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: dsum to caculate quantity of rows within a range criteria

    ok lets try that again...
    A
    B
    C
    D
    3
    TL
    2
    4
    PT
    8
    5
    PT
    29
    6
    PT
    0
    7
    TL
    10
    8
    TL
    11
    9
    TL
    36
    10
    PT
    9
    11
    AB
    50
    12
    13
    SUMIF COUNTIF AVERAGEIF
    14
    TL
    60
    5
    12
    15
    PT
    46
    4
    11.5
    16
    AB
    50
    1
    50


    B14=SUMIF($A$2:$A$11,$A14,$B$2:$B$11)
    C14=COUNTIF($A$2:$A$11,$A14)
    D14=AVERAGEIF($A$2:$A$11,$A14,$B$2:$B$11)

  8. #8
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: dsum to caculate quantity of rows within a range criteria

    That was my initial thought, but I was under the assumption that the D formulas or Database formulas are for data not contained within the sheet. Did a little homework shortly after and I would say that the IF statements are a better choice as you can expand into plural of those (SumIfS, CountIfS, AverageIfS) giving you more to work with should you need it. Glad the DCount worked, but I would agree with FDibbins and suggest checking out the IF based sum,average and counts.

    Cheers -

+ 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. Disjoint range for DSUM criteria
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  2. Disjoint range for DSUM criteria
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  3. Disjoint range for DSUM criteria
    By Jim Bennett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  4. [SOLVED] Disjoint range for DSUM criteria
    By Jim Bennett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  5. Disjoint range for DSUM criteria
    By Jim Bennett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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