Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default fixing the result of a formula after a certain date

Hello everyone,

I want the result of a formula to be changed into a fixed value after a
certain date has passed. Does anyone know how to do that?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default fixing the result of a formula after a certain date

Hi Rein,

A formula cannot convert itself to no formula, but you can
test the date and have the formula return a specific value..

=IF(TODAY()Date(2005,12,31),100, A1*b1)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Rein" wrote in message ...
Hello everyone,

I want the result of a formula to be changed into a fixed value after a
certain date has passed. Does anyone know how to do that?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default fixing the result of a formula after a certain date

You will need to copy it and paste (into the same cell) as values - the
tricky part is how to trigger it - i.e. when do you test for the date and
make the change? And how do you know what the date is when you should do the
change?

Assuming you know (or can calculate) the date when you want it done, you
probably would want code to go in the Workbook_Open event, so it triggers the
first time the book is opened on or after the date specified:

Private Sub Workbook_Open()
Dim MyDateCell as Range, SpecifiedDate as Date

' Set MyDateCell to the cell with the date formula in it
' Calculate (or set) SpecifiedDate to be the effective date for the change

If Date() = SpecifiedDate Then
MyDateCell.Copy
MyDateCell.PasteSpecial xlPasteValues
End If

End Sub

"Rein" wrote:

Hello everyone,

I want the result of a formula to be changed into a fixed value after a
certain date has passed. Does anyone know how to do that?


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
Fixing date of entry Colin Hayes Excel Worksheet Functions 14 May 12th 11 03:07 AM
Fixing the date format in a macro or VBA Geoff B Excel Worksheet Functions 1 September 7th 09 11:00 AM
Fixing a formula Boethius1 Excel Discussion (Misc queries) 2 January 18th 06 11:38 PM
Fixing the date. cs2883 New Users to Excel 7 October 7th 05 07:40 PM
Sum formula result expressed as a date Robert E Hansen Excel Discussion (Misc queries) 1 January 11th 05 12:13 AM


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