Forum Discussion

ExcellerateSolutions's avatar
ExcellerateSolutions
Copper Contributor
May 02, 2023
Solved

Named table referencing visible values

I have an amortization table with a named range 'Payment Schedule' with named columns. The formula in Payment Number displays an incremental payment number when the End Balance is > $0, otherwise th...
  • mathetes's avatar
    mathetes
    May 02, 2023

    ExcellerateSolutions 

     

    Going by all the named ranges and sophisticated formulas, you clearly know your way around Excel. But perhaps you've not used the IFS function before. In general, it makes for slightly clearer logic when multiple conditions need to be tested.

     

    Here's what I came up with in your column M.  (I've attached a revised copy, as I downloaded your file to my computer to work directly on my own computer rather than in the cloud.)

    =IFS([@[Payment Number]]=1,"Opening Balance",[@[End
    Balance]]>0,"",SUM(K18:K19)=0,"",[@[End
    Balance]]=0,"Closing Balance")

    Essentially, I added a different condition, that being two rows sequentially (the current and the prior) totaling $0.00, to leave the row blank. That way, only the first instance of "End Balance" being zero gets the result "Closing Balance"

    You could combine the second and third conditions with an OR, if desired, since they both lead to the "" result, but that might make it harder to debug in the future. 

    FYI, in case you're not familiar with IFS, the formula "stops" once it reaches a condition that is met, so the sequence in which you list them is critical. That's why the sum of those two rows being zero precedes the one that elicits "Closing Balance" -- otherwise, every row with zero gets "Closing Balance" (as you discovered).

Resources