Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,081
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Same formula, different results depending on machine? Ken Johnson Excel Worksheet Functions 9 August 12th 07 12:07 PM
How to use HLOOKUP for different sheets depending on results from 2 cells [email protected] Excel Worksheet Functions 9 December 14th 06 11:15 PM
CONDITIONAL RESULTS DEPENDING ON CELL'S NAME (sumproduct) HERNAN Excel Discussion (Misc queries) 4 September 5th 06 09:02 PM
Adding numbers in rows results in zero. help! Mr_Philby_Takeshi Excel Worksheet Functions 4 July 8th 06 04:27 PM
Compare 2 Worksheets Create a 3rd depending on results Kevin Excel Discussion (Misc queries) 1 February 4th 05 11:49 PM


All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"