Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying calculated values


I'm a college student working on a project and i'm completely
inexperienced with excel programming so any kind of help will be
greatly appreciated.

Here's the scenario: I'm doing a program to forecast demands. I have
a column showing the actual sales and another column showing the
forecasts. On a separate cell I have the formula for calculating the
forecast based on what the user inputs as 'n' (i.e If user enters n=2,
then take the 2 most recent sales and divide them by n=2, etc.)

How do I program my 'Submit' button so that the calculated value is
reflected on my forecast column as the most recent forecasted value and
make it repeat the process for the next forecast. (i.e. Calculate
forecast, click Submit, enter to C15...do the same process of
calculating, click Submit, enter to C16 and so on).

Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying calculated values

do you have to use a macro?

You could probably do this with formulas

if the number of sales is constant and the last cell with a cell is in A20
for example (previous cells in A1:A19)

the "n" entered in B1

in B2
=AVERAGE(OFFSET($A$20,-B1+1,0,B1,1))

To set a cell to a value with VBA

Range("B2").Value = "Some Value"

--
Regards,
Tom Ogilvy


smartee628 wrote in message
...

I'm a college student working on a project and i'm completely
inexperienced with excel programming so any kind of help will be
greatly appreciated.

Here's the scenario: I'm doing a program to forecast demands. I have
a column showing the actual sales and another column showing the
forecasts. On a separate cell I have the formula for calculating the
forecast based on what the user inputs as 'n' (i.e If user enters n=2,
then take the 2 most recent sales and divide them by n=2, etc.)

How do I program my 'Submit' button so that the calculated value is
reflected on my forecast column as the most recent forecasted value and
make it repeat the process for the next forecast. (i.e. Calculate
forecast, click Submit, enter to C15...do the same process of
calculating, click Submit, enter to C16 and so on).

Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


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
Calculated values in a cell frankobl3 New Users to Excel 5 November 12th 08 06:27 PM
Copying formatting from a cell whose location I have calculated. sdm New Users to Excel 4 September 8th 08 08:40 PM
Calculated Values ssoerens Excel Worksheet Functions 2 July 25th 07 04:26 AM
Exporting calculated values Susan Setting up and Configuration of Excel 2 September 11th 06 06:27 PM
Operating on Non Calculated Values Hubie Excel Discussion (Misc queries) 4 April 9th 06 01:49 AM


All times are GMT +1. The time now is 06:47 AM.

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"