+ Reply to Thread
Results 1 to 6 of 6

Counting in specific events in a date range

  1. #1
    Registered User
    Join Date
    08-18-2008
    Location
    Bay Area
    Posts
    3

    Counting in specific events in a date range

    I'm trying to count the number of chargebacks that were received in 1 month but were for different months.

    An example: I received 29 chargebacks in July, and 8 were for May, 9 were for April, 10 for June, and 2 for July trx.

    I've been trying to use countif but am falling short of accomplishing this. I've been able to get the total chargebacks in the timeframe, but further breaking it down has been a pain.

    For # of chargebacks received in a given month, I've used:
    =COUNTIF(Total!$G$2:$G$4000,">5/31/2008")-COUNTIF(Total!$G$2:$G$4000,">6/30/2008")

    For # of chargebacks FOR a given month, I've used:
    =COUNTIF(Total!$F$2:$F$4000,">5/31/2008")-COUNTIF(Total!$F$2:$F$4000,">6/30/2008")

    Column F is the transaction date, and date of notification for chargeback is G.

    Any assistance folks can lend in this is MUCH appreciated. I have a preso to the board tomorrow and could REALLY use this data.
    Attached Files Attached Files
    Last edited by chamaile0n; 08-18-2008 at 03:26 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sumproduct should help

    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

    Can you post a sample file with expected results



    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    08-18-2008
    Location
    Bay Area
    Posts
    3
    Added file to original post

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this help

    In J3 try
    =COUNTA(G:G)-1
    In K3 and drag across
    =SUMPRODUCT(--(TEXT($F$2:$F$30,"MMM")=TEXT(K2,"MMM")))
    VBA Noob

  5. #5
    Registered User
    Join Date
    08-18-2008
    Location
    Bay Area
    Posts
    3
    Ah, one point of clarity to add - my spreadsheet has multiple months on it. While I only added July in the example, I have previous months data intermingled, which is what really makes this a pain.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Ah, one point of clarity to add - my spreadsheet has multiple months on it. While I only added July in the example, I have previous months data intermingled, which is what really makes this a pain.
    Would a dynamic pivot group by month be a better option then

    Dynamic Range
    http://www.contextures.com/xlPivot01.html

    Grouping by month
    http://www.contextures.com/xlPivot07.html

    If there is a problem grouping take a look at this link
    http://www.contextures.com/xlPivot07.html#Problems

    Pivot Table videos
    http://video.about.com/spreadsheets/...vot-Tables.htm
    http://www.datapigtechnologies.com/ExcelMain.htm

    VBA Noob

+ 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. Import database query that has a date range
    By trigger05 in forum Excel General
    Replies: 3
    Last Post: 06-18-2008, 12:16 PM
  2. Getting date range data from 1 or 2 sheets
    By Attila in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 06-06-2008, 11:32 AM
  3. Days for each month in a date range
    By goldy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2007, 06:17 PM
  4. Macro to filter every tab from a user entered date range
    By penny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2007, 02:35 PM
  5. Search Date within Date Range
    By sach0025 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2007, 02:30 PM

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