+ Reply to Thread
Results 1 to 4 of 4

Tried SumIF and Index/match with dates -- no luck

  1. #1
    Registered User
    Join Date
    01-21-2022
    Location
    Kansas
    MS-Off Ver
    Excel 2016
    Posts
    2

    Tried SumIF and Index/match with dates -- no luck

    Been working on this off and on for the last couple days and running out of ideas. A little context -- I run a small physical therapy business and have two reports, one that provides reimbursement for each medical claim (Receipts Example). The other is line item of charges including dates of service (Charges Example). I am trying to get down to average reimbursement per visit; however, the a patient can have 2 or 3 visits per week and the Receipts Example report only provides a date range, but not how many visits fall within that range.

    For examples on the Receipts Example spreadsheet, Row 2 is one payment for account number 347202 for all their visits ranging between 10/01/2021 and 10/12/2021, but I have no idea if that payment contains 1, 2, 3, or 4 visits. That is where the Charges Example spreadsheet comes into play -- it does list each line item that is billed. I added the visit and total per visit columns and used the IF/And and SumIFs functions to combine each line into "visits". Rows 2 thru 5 all have the same "Service Date" in column D for account 347202. Rows 6 thru 9 are for the same account, but have a service date of 10/12/2021 and finally 10 thru 13 a different date of service, 10/26/2021.

    To summarize account 347202 had 3 total visits, 10/5/2021, 10/12/2021, and 10/26/2021 according to the Charges Examples spreadsheet. The 2 payments for account 347202, reflected on Receipts Example spreadsheet, are broken down by all visits between 10/01/2021 (column C2) - 10/12/2021 (column D2) and 10/13/2021 (column C3) - 10/30/2021 (column D3). So I know he had 2 visits for row 2 and 1 visit for row 3. I'd like to have column O of "Receipts Example" reflect how many visits are contained within that payment.

    I've tried using IF & And functions but its difficult with dates. I wish I could use a v-lookup but so many duplicate account numbers. Any suggestions or ideas how I could accomplish this? I've re-read what I typed and I even get a bit confused myself so I am sure there will be questions. I am also sure their is an easier way to accomplish this and I am making it more complex than it needs to be.

    I am using Excel 2016. All patient information is retracted.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Tried SumIF and Index/match with dates -- no luck

    Do you happen to have Excel 365?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-21-2022
    Location
    Kansas
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Tried SumIF and Index/match with dates -- no luck

    No, unfortunately I use Excel 2016. Definitely need to make the upgrade.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Tried SumIF and Index/match with dates -- no luck

    Try

    in O2

    =SUMPRODUCT(--('[Charges Example.xlsx]Sheet1'!$G$2:$G$100=B2)*('[Charges Example.xlsx]Sheet1'!$D$2:$D$100>=C2)*('[Charges Example.xlsx]Sheet1'!$D$2:$D$100<=D2),('[Charges Example.xlsx]Sheet1'!$E$2:$E$100))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] SUMIF with INDEX MATCH between 2 dates
    By FueledbyExcel in forum Excel General
    Replies: 4
    Last Post: 11-01-2019, 08:58 AM
  2. Sumif / Index Match - Sum together between two dates
    By jonesm2 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-09-2017, 12:18 PM
  3. Searching for 2 criteria - trying Index/Match with no luck
    By notsamsnead in forum Excel General
    Replies: 6
    Last Post: 11-11-2015, 12:28 AM
  4. Sumif or Index/Match on Multiple Criteria including Dates to Month?
    By patrick1024 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2015, 11:00 PM
  5. [SOLVED] Help, Cannot Get Rid of #N/A when using Index, Match - Have looked at prev posts & no luck
    By darkmagikmatt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2014, 03:20 PM
  6. Replies: 1
    Last Post: 08-15-2013, 11:04 PM
  7. Replies: 2
    Last Post: 08-02-2005, 03:05 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