printing different numbers of rows of results depending on user in
I want to have a user enter a number in a box and then have Excel update results for that many rows of results automatically. As a more concrete example, consider an Excel mortgage worksheet where the user enters the number of years of his/her mortgage into a box and Excel then calculates the remainder of principle for each year inbetween. So if the user entered 15 years, e.g., then Excel would print 15 rows of calculations, each row containing remaining principal information for that year. If the user then changed the input to 30 years, then 30 lines of information would be printed. (I'm not asking about the mortgage calculations; I'm just asking how to get Excel to automatically produce a set number of lines of any output given a user's input). Thanks, Aaron |
printing different numbers of rows of results depending on user in
To CREATE formulas for the specified number of periods you'd need a macro.
Though not terribly difficult, it wouldn't be trivial either An alternative would be to have the formulas in place but wrap them in an IF statement so that they'd return "" if the period # was greater than the number entered by the user, like this formula for row 15, where the user's input is in B2 and the period numbers are in column A =if(A15$B$2,"", - your formula here - ) Any formulas for periods beyond what the user requested would APPEAR to be blanks. "ajmaschinot" wrote: I want to have a user enter a number in a box and then have Excel update results for that many rows of results automatically. As a more concrete example, consider an Excel mortgage worksheet where the user enters the number of years of his/her mortgage into a box and Excel then calculates the remainder of principle for each year inbetween. So if the user entered 15 years, e.g., then Excel would print 15 rows of calculations, each row containing remaining principal information for that year. If the user then changed the input to 30 years, then 30 lines of information would be printed. (I'm not asking about the mortgage calculations; I'm just asking how to get Excel to automatically produce a set number of lines of any output given a user's input). Thanks, Aaron |
All times are GMT +1. The time now is 10:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com