+ Reply to Thread
Results 1 to 15 of 15

Date counting items??

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Date counting items??

    Hello,

    Say I have a date range of one week and I want to add up how many items were sold on any given day how would I do this?

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Date counting items??

    Perhaps use COUNTIF or SUMIF depending on what your data is

    =COUNTIF(Week_Range,Date)

    =SUMIF(Week_Range,Date,Sum_of_items)

    A sample file will help
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Thanks for the help. I've uploaded a sample file

    Thanks,
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Date counting items??

    in A18
    jumper

    in A19
    =COUNTIF(A1:A16,A18)
    for number of items

    in A20
    =SUMIF(A1:A16,A18,B1:B16)
    for cost of items sold
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Hey, that gives the total for the number of items but not the number of items on a given date (18/09/12 in this example)?

  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
    52,938

    Re: Date counting items??

    see if the attached give you what you want? Note that for the name "socks", 1 entry has a space at the end, the other does not.

    i have given you a total sum and count by day, as well as a total sum and count by date and name. use whichever you need
    Attached Files Attached Files
    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

  7. #7
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Sorry all,

    I haven't made myself very clear.

    I've attached another sample. I want the number of 'exchanges' to be counted that happened on that day.

    see attached.

    Thanks,EXAMPLE1.xlsx

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Date counting items??

    try either of the two..

    =SUMPRODUCT(--(DATE(YEAR($B$4:$B$192),MONTH($B$4:$B$192),DAY($B$4:$B$192))=DATE(YEAR(E5),MONTH(E5),DAY(E5))))
    or
    =COUNTIFS($B$4:$B$192,">"&E5,$B$4:$B$192,"<"&(E5+1))

  9. #9
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Hey thanks Ace, would you be able to put that into the spreadsheet for me? It's confusing me when trying..

    Thanks,

  10. #10
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Date counting items??

    See attached. Does this help?
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Ar thanks. Sorry to keep asking questions. This forum is so helpful!

    How do those formulas know to look up 'exchanges'? I'm asking so when I add refunds to the mix I want the formula to be able to pick those up too.

  12. #12
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Date counting items??

    How do those formulas know to look up 'exchanges'? I'm asking so when I add refunds to the mix I want the formula to be able to pick those up too.
    I am sorry, I do not understand. Could you post a 'complete (in all respects)' sample with expected results

  13. #13
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    six.xlsxhello, yes sorry.

    see attached. i want to be able to change the varibles the forumla it's looking up. In the report attached the report has both refunds and exchanges in.

  14. #14
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Date counting items??

    Change the titles G5 and H5 to read EXCHANGE and REFUND respectively.
    Add in another criteria in the COUNTIFS.


    Hence,
    In G6
    =COUNTIFS($A$5:$A$499,G$5,$C$5:$C$499,">"&$F6,$C$5:$C$499,"<"&($F6+1))
    In H6
    =COUNTIFS($A$5:$A$499,H$5,$C$5:$C$499,">"&$F6,$C$5:$C$499,"<"&($F6+1))

    and copy down. See attached
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Date counting items??

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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