Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old March 15th 19, 06:19 PM
Junior Member
 
First recorded activity by ExcelBanter: Jan 2012
Posts: 8
Default Preserving Cell Values for Comparison

What Im trying to do is preserve a cell value generated by a formula for comparison purposes.

So, the formula functions each time the numerical data is entered. The cell containing the formula produces a resulting value. I then reference that value in another cell (which I would like to preserve).

Each time the formula receives new data the resulting value changes. This is fine if I can reference (and preserve) the new value in another cell. This way I would be able to compare the cell values each time new data is entered into the formula.

Unfortunately, other than manually copying and pasting, I have not been able to find a way to automate this simple procedure. Of course, each time the formula sees new data its cell value changes as well as any cell that references that value.

Any ideas?

  #2   Report Post  
Old March 16th 19, 02:19 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,001
Default Preserving Cell Values for Comparison

What I’m trying to do is preserve a cell value generated by a formula
for comparison purposes.

So, the formula functions each time the numerical data is entered. The
cell containing the formula produces a resulting value. I then
reference that value in another cell (which I would like to preserve).

Each time the formula receives new data the resulting value changes.
This is fine if I can reference (and preserve) the new value in another
cell. This way I would be able to compare the cell values each time new
data is entered into the formula.

Unfortunately, other than manually copying and pasting, I have not been
able to find a way to automate this simple procedure. Of course, each
time the formula sees new data it’s cell value changes as well as any
cell that references that value.

Any ideas?


Record a macro of the copy/paste? (be sure to PasteValues, though)

Something like...

Range("B6").Value = Range("B6").Value

..where B6 contains the formula that returns the value you want to preserve.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Old March 21st 19, 04:07 PM
Junior Member
 
First recorded activity by ExcelBanter: Jan 2012
Posts: 8
Default

Thank you. I'll give it a shot.

Do you think it might also be a good idea to Dimension any variables used as "Static"?
  #4   Report Post  
Old March 21st 19, 09:15 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,001
Default Preserving Cell Values for Comparison

Thank you. I'll give it a shot.

Do you think it might also be a good idea to Dimension any variables
used as "Static"?


If you mean declaring variable type, this is mandatory Best Practice and so you
should check the option 'Require Variable Declaration' on the Options General
tab in the VBA IDE! This will 'force' you to explicitly Define variables and
obviate implicitly using variables altogether!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Automatically Maintaining Cell Values for Comparison Sam Spade Excel Discussion (Misc queries) 3 August 23rd 16 10:32 PM
Set value from comparison of other cell values? David Excel Programming 2 April 20th 16 03:00 PM
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets Doctorjones_md Excel Discussion (Misc queries) 7 June 8th 07 09:32 PM
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets Doctorjones_md Excel Worksheet Functions 7 June 8th 07 09:32 PM
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets Doctorjones_md Excel Programming 7 June 8th 07 09:32 PM


All times are GMT +1. The time now is 12:07 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017