Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How retain calculated value in a cell despite changes to inputs

Please, could any one help me to save the result resent in a cell following a
calculation (by functions), despite changing the parameters affecting the
results?

For example;

If I do a*b=c

I want the result c to be saved in a cell while I change b to d in the
same function.

If now a*d=e

I would like a row, somewhat like the below

c
e
..
..
..

Hope this is clear.

Thank you

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How retain calculated value in a cell despite changes to inputs

Let's say in C1 we have
=A1+B1
and we want to record the values in C1 in the cells below whenever we change
either A1 or B1.

Enter the following macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1:B1")
If Intersect(r, Target) Is Nothing Then Exit Sub
n = Cells(Rows.Count, "C").End(xlUp).Row + 1
Cells(n, "C").Value = Range("C1").Value
End Sub

The first time either A1 or B1 is changed the value in C1 is copied to C2,
the next time to C3, etc.


REMEMBER the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200750


"pnic" wrote:

Please, could any one help me to save the result resent in a cell following a
calculation (by functions), despite changing the parameters affecting the
results?

For example;

If I do a*b=c

I want the result c to be saved in a cell while I change b to d in the
same function.

If now a*d=e

I would like a row, somewhat like the below

c
e
.
.
.

Hope this is clear.

Thank you

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
How retain calculated value in a cell despite changes to inputs pnic Excel Discussion (Misc queries) 3 October 17th 07 03:40 PM
Openinging files using cell inputs MWTCarter Excel Discussion (Misc queries) 0 October 25th 06 03:27 PM
how to change a calculated cell to = the calculated value CAM Excel Discussion (Misc queries) 4 January 26th 06 05:26 PM
One cell takes multiple inputs csw78 Excel Discussion (Misc queries) 4 May 27th 05 03:46 AM
Add two cell values, retain it, and add another value Jay Excel Worksheet Functions 7 April 22nd 05 06:24 PM


All times are GMT +1. The time now is 09:33 PM.

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

About Us

"It's about Microsoft Excel"