+ Reply to Thread
Results 1 to 15 of 15

Formula for Case Rate Payment prioritization

  1. #1
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Formula for Case Rate Payment prioritization

    Hi all,

    I need help with a formula that assigns a hierarchy to reimbursement based on payment type and contract rate. In particular, if the payment type is "Case" then we only get reimbursed for the line with the highest case rate; additionally, if there are 2 or more lines with the highest case rate then we only get paid on one of them (it doesn't matter which one necessarily, only the amount matters).

    I have attached a spreadsheet with examples of how the formula should work, so if anyone has any ideas please let me know.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    What about other payment types? I don't believe your workbook to be a truly representative dataset - let's get that right before we start offering suggestions.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    This in O2 copied down might give you a start:

    =IF(ROWS(O$2:O2)=MATCH(MAX([Contract Rate]),[Contract Rate],0),N2,0)

  4. #4
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    Attached is a more inclusive workbook with all of the rules I need to apply to the reimbursement column.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    In H16 copied down:

    =IF([@[Payment Type]]="Case",IF(ROWS(F$16:F16)=MATCH(MAX([Rate]),[Rate],0),[@Rate],0),IF([@[Payment Type]]="Add-on",F16,IF(AND([@[Payment Type]]="POC",COUNTIF([Payment Type],"Case")=0),F16,0)))

  6. #6
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    Fantastic! Seems to be working like a charm, thanks for your help.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    You're welcome!

  8. #8
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    Actually I found one slight miscalculation that I have been trying to solve but I can't seem to figure it out.

    Only the highest case rate applies even if it is smaller than say a Visit line.

    So I need the below formula to look for the max "Case", not the max of the whole row if that makes sense.

    IF([@[Payment Type]]="Case",IF(ROWS(F$16:F17)=MATCH(MAX([Rate]),[Rate],0),[@Rate],0)
    Attached Files Attached Files

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    We didn't have visit defined before, did we, so how could my formula account for it? I'll have a look, but is there anything else you are planning on throwing into the mix?

  10. #10
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    I put Visit and Fee Schedule into the formula because those are the two other possible payment types.

    The payment type possibilities are:
    • Add-on
    • Case
    • Fee Schedule
    • Visit
    • POC

    Add-on always gets paid, only the highest case rate applies, if case rate is in the payment type column then POC Visit and Fee Schedule are 0, but if case does not exist then those get paid at [Rate].

    I believe that covers everything, but I will update if I uncover any other rules.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    Try this:

    =IF([@[Payment Type]]="Case",IF(ROWS(F$16:F16)=MATCH(MAXIFS([Rate],[Payment Type],"Case"),[Rate],0),[@Rate],0),IF([@[Payment Type]]="Add-on",F16,IF(AND([@[Payment Type]]="POC",COUNTIF([Payment Type],"Case")=0),F16,0)))

  12. #12
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    The MAXIFS seems like it would solve the issue but I don't think that function is not available in my Excel, which is odd because I am operating on Windows 10 using Excel 2016.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    Apologies - it's only in the subscription version. Give me two ticks.

    This:

    =IF([@[Payment Type]]="Case",IF(ROWS(F$16:F16)=MATCH(MAX(IF([Payment Type]="Case",[Rate])),[Rate],0),[@Rate],0),IF([@[Payment Type]]="Add-on",F16,IF(AND([@[Payment Type]]="POC",COUNTIF([Payment Type],"Case")=0),F16,0)))

    ... which is an array formula and needs conforming with CTRL+SHIFT+ENTER, not just ENTER, before copying and pasting down.

  14. #14
    Registered User
    Join Date
    11-22-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    37

    Re: Formula for Case Rate Payment prioritization

    Wonderful, I put it into my main workbook and it works!

    Thank you again for you effort.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formula for Case Rate Payment prioritization

    You're welcome!

+ 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. Internal Rate of Return with Variable Payment Date Streams
    By Cheeseburger in forum Excel General
    Replies: 5
    Last Post: 12-07-2016, 01:05 AM
  2. Prioritization Formula for a document conversion project
    By BrettS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-06-2015, 04:18 PM
  3. [SOLVED] Variable payment rate for the NPER function
    By mabbutt in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-24-2014, 07:18 AM
  4. Replies: 0
    Last Post: 12-15-2005, 10:45 AM
  5. how do I calculate a monthly payment based on a variable rate?
    By Chick N Egg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-17-2005, 05:10 PM
  6. Calculate Interest Rate when payment changes!
    By huntermcg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-25-2005, 03:32 AM
  7. Loan amount fx if interest rate, payment and amortization know
    By Kevin. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2005, 06: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