View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1110_] Simon Lloyd[_1110_] is offline
external usenet poster
 
Posts: 1
Default Converting Formulas to Hard Values and Vice Versa?


You may have to use this in a worksheet calculate if it doesn't work
with the oracle update but this should get you what you need!

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Column < 5 Then Exit Sub
If Target.Cells.Count 1 Then Exit Sub
If Target.Value = "Firm" Then
With Target
..Offset(0, 11) = .Offset(0, 11).Value
..Offset(0, 12) = .Offset(0, 12).Value
..Offset(0, 13) = .Offset(0, 13).Value
End With
ElseIf Target.Value = "Tentive" Then
With Target
..Offset(0, 11).Formula = "=Column_O_Calc"
..Offset(0, 12).Formula = "=Column_P_Calc"
..Offset(0, 13).Formula = "=Column_Q_Calc"
End With
End If
End Sub


Harold Shea;323688 Wrote:
I have a large spreadsheet which is updated with order statuses on a
weekly
basis. Each row shows a different order. In Column E is the current
status of
each order: "Firm" or "Tentative." In Columns O, P, and Q are formulas
that
calculate various milestone dates for the order. These dates
recalculate
throughout the life cycle of the order, but once the order status in
Column F
turns to FIRM, these dates are frozen. Is there a way to use a
Worksheet_Change event to read the statuses in Column F and, when one
changes
to FIRM, to replace the values in Columns O, P, and Q on that row with
whatever their current values are? And is the reverse possible in case
a use
makes an error? You know, if a status changes back to TENTATIVE, for
the
formulas in O, P, and Q to restore to formulas? (I've given the
formulas
names "Column_O_Calc", "Column_P_Calc", and "Column_Q_Calc")

Users can do all of this manually, but the problem is that the sheet is
a
couple of thousand lines long and the updates numerous. To complicate
things,
the status info in Column F can be imported into the sheet from Oracle
OR
manually changed by users, so any macro would have to respond to cell
changes
in either case.

I'd really appreciate any help anyone can offer.



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90445