Forum Discussion
Return value only in rows specified by entering a number in an exterior cell to the table
Twifoo's solution is elegant and compact but relies upon hard-coding both the extra payment periods and amount within the formula. To avoid this some way of parsing or searching the comma-separated string is needed. I chose the latter, first padding the list with additional commas to give a name ONE.TIME that refers to
= comma & ONE.TIME.LIST & comma
where 'comma' refers to
= ","
(just to improve legibility).
The test to determine whether the payment number has an associated one-time payment is
= ISNUMBER( SEARCH( comma & amortization[@[PMT NO.]] & comma, ONE.TIME) )
which is held as a named formula 'ONE.TIME.NO?'.
Finally to populate the 'EXTRA PAYMENT' column (your capitals, I am not shouting at you :-)
= IF( ONE.TIME.NO?, ONE.TIME.AMOUNT, "" )
Another catch is that the user may embed spaces in the list of one-time payments, in which case an extra processing step is needed to replace them with null strings.