+ Reply to Thread
Results 1 to 10 of 10

A formula to accommodate a few simple math conditions

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    A formula to accommodate a few simple math conditions

    Hello,

    I am attempting to find the reimbursement % for a very large data range. The rows are setup so that the first is the charge and the row or rows beneath it (no more then two) are the payments. I am looking for a formula that can accommodate a few different conditions that will occur throughout the data range, which will enable me to drag the formula down. As of now, because I am not able to come up with the appropriate formula, I am inputting the formula in for each set of charge/payment(s) manually. ick! I have an example workbook which thoroughly explains what I need! is there anyone who can help?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: A formula to accommodate a few simple math conditions

    It's a bit clunky but it works. Put this in O4 and drag down. Format the cell to a percentage.

    Formula: copy to clipboard
    =IFERROR(IF(F4="","",IF(F6="",-1*SUM(N5:N6)/SUM(M4:N4),-1*N5/SUM(M4:N4))),"")


    Let me know if this works for you. Thanks

  3. #3
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    TPDave,
    Thank you very much! Your formula works wonderfully, clunky or not!

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: A formula to accommodate a few simple math conditions

    Using your posted workbook, this regular formua, copied down, calculates the Reimb Pct
    O4: =IF(F4,-SUMPRODUCT((F5:F6="")*M5:N6)/SUM(M4:N4),"")
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    Ron Coderre,

    Your formula also works wonderfully! I will have to try both to see which will be more efficient with a very large set of data. Thank you very much for your time spent on my concern!

  6. #6
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    Ron Coderre,

    Hello, is there a way to modify the formula to accommodate for a very rare third payment row? I just happen to stumble across one.

  7. #7
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    Here is an example of what I am talking about
    Attached Files Attached Files

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: A formula to accommodate a few simple math conditions

    Using your posted workbook, try this regular formula, copied down:
    O4: =IF(F4<>"",SUM(M5:INDEX(N5:N20,MATCH(1,INDEX(--(F5:F20<>""),0),0)-1))/SUM(M4:N4),"")
    Is that something you can work with?

  9. #9
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    Can anyone help here?

  10. #10
    Forum Contributor
    Join Date
    04-02-2013
    Location
    West Palm beach, Fl
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: A formula to accommodate a few simple math conditions

    That works brilliantly! Thank you for your time with my problem, and I hope I wasn't to much trouble.

+ 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. I need help with a few simple math formula problems
    By futurepbamember in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2014, 12:54 AM
  2. [SOLVED] Simple math formula
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-26-2013, 10:18 PM
  3. formula that does simple math a specific number of times
    By salex in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2007, 12:10 PM
  4. Skipping blank cells in simple math formula
    By jimtmcdaniels in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2006, 01:40 AM
  5. Replies: 3
    Last Post: 02-16-2006, 07:00 AM

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