Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mp
 
Posts: n/a
Default Convert formula to value based upon date

Here is what I want to do:
Cell1 references Cell2. Cell2 is a number that is pulled from another
worksheet. The value in Cell2 can change based upon new information entered
into the other worksheet. Cell1, however, should retain the old information
from Cell2 if TODAY() is than the date at the top of the column in which
Cell1 resides. If TODAY() is < than that date Cell1 should update. I'm
really not sure how to make this happen! Help much appreciated. I've
thought about enabling manual recalculation, but this won't work for other
reasons.


  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Convert formula to value based upon date

I think I'd use an event macro that fires each time the worksheet recalculates.

If you want to try, rightclick the worksheet tab with cell1, cell2, and the date
cell on it. Select View code and paste this into the code window.

Option Explicit
Private Sub Worksheet_Calculate()

Dim Cell1 As Range
Dim Cell2 As Range
Dim DateCell As Range

Set Cell1 = Me.Range("a2")
Set Cell2 = Me.Range("b2")
Set DateCell = Cell1.EntireColumn.Cells(1)

If Date DateCell.Value Then
'do nothing
Else
Cell1.Value = Cell2.Value
End If

End Sub

Then close this window and back to excel and try it out (by changing the cell
that cell2 uses) (and the date cell, too.)



mp wrote:

Here is what I want to do:
Cell1 references Cell2. Cell2 is a number that is pulled from another
worksheet. The value in Cell2 can change based upon new information entered
into the other worksheet. Cell1, however, should retain the old information
from Cell2 if TODAY() is than the date at the top of the column in which
Cell1 resides. If TODAY() is < than that date Cell1 should update. I'm
really not sure how to make this happen! Help much appreciated. I've
thought about enabling manual recalculation, but this won't work for other
reasons.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
mjp
 
Posts: n/a
Default Convert formula to value based upon date


Thank you. I'll give that a try!


--
mjp
------------------------------------------------------------------------
mjp's Profile: http://www.excelforum.com/member.php...o&userid=28876
View this thread: http://www.excelforum.com/showthread...hreadid=486117

  #4   Report Post  
Posted to microsoft.public.excel.misc
mjp
 
Posts: n/a
Default Convert formula to value based upon date


This blanks the cell that I'm trying to preserve when it is supposed to
'do nothing! Suggestions?


--
mjp
------------------------------------------------------------------------
mjp's Profile: http://www.excelforum.com/member.php...o&userid=28876
View this thread: http://www.excelforum.com/showthread...hreadid=486117

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
overtime formula based on dynamic date range? kalika Excel Worksheet Functions 2 August 28th 05 08:40 AM
imported impromtu report date issue - fix by format or formula Todd F. Excel Discussion (Misc queries) 3 July 7th 05 09:57 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Excel formula with date constraints Warrior Pope Excel Discussion (Misc queries) 3 January 28th 05 03:08 PM
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 12:41 AM


All times are GMT +1. The time now is 10:52 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"