Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Need to stop formula and keep value on met condition

I have a spreadsheet I use to track tasks for my branch. All the information
is in a list.
Column C is due dates [starting in row 3]
Cell J2 is the function =TODAY() [outside of the list]
Column E is days left until due via the formula =-(J$2-C#) [starting in row
3]
Column D is either "Open" or "Closed" depending if the task is complete or
not. This column is manually changed and is always spelled exactly the same
thanks to predictive text.

What I would like is when Column D is changed from "Open" to "Closed" that
the value in column E stops changing.
This would allow me to see how early or late tasks are completed. Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Need to stop formula and keep value on met condition

Hi,

You need a macro for that. This changes the formula in Column E to a value
when column C changes to Close. Right click your sheet tab, view code and
paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 4 Or Target.Cells.Count 1 Then Exit Sub
If UCase(Target.Value) = "CLOSED" Then
Target.Offset(, 1).Value = Target.Offset(, 1).Value
End If
End Sub

Mike

"AUCP03" wrote:

I have a spreadsheet I use to track tasks for my branch. All the information
is in a list.
Column C is due dates [starting in row 3]
Cell J2 is the function =TODAY() [outside of the list]
Column E is days left until due via the formula =-(J$2-C#) [starting in row
3]
Column D is either "Open" or "Closed" depending if the task is complete or
not. This column is manually changed and is always spelled exactly the same
thanks to predictive text.

What I would like is when Column D is changed from "Open" to "Closed" that
the value in column E stops changing.
This would allow me to see how early or late tasks are completed. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Need to stop formula and keep value on met condition

Works great Mike H. Thank you.

"Mike H" wrote:

Hi,

You need a macro for that. This changes the formula in Column E to a value
when column C changes to Close. Right click your sheet tab, view code and
paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 4 Or Target.Cells.Count 1 Then Exit Sub
If UCase(Target.Value) = "CLOSED" Then
Target.Offset(, 1).Value = Target.Offset(, 1).Value
End If
End Sub

Mike

"AUCP03" wrote:

I have a spreadsheet I use to track tasks for my branch. All the information
is in a list.
Column C is due dates [starting in row 3]
Cell J2 is the function =TODAY() [outside of the list]
Column E is days left until due via the formula =-(J$2-C#) [starting in row
3]
Column D is either "Open" or "Closed" depending if the task is complete or
not. This column is manually changed and is always spelled exactly the same
thanks to predictive text.

What I would like is when Column D is changed from "Open" to "Closed" that
the value in column E stops changing.
This would allow me to see how early or late tasks are completed. 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
Condition formula Herb Excel Discussion (Misc queries) 2 April 1st 09 12:07 AM
If formula with two condition adib Excel Worksheet Functions 3 March 11th 09 11:57 AM
conditional: stop function under certain condition kana Excel Worksheet Functions 1 September 5th 07 03:54 PM
MORE THAN ONE CONDITION IN A FORMULA CLM Excel Worksheet Functions 5 January 18th 07 01:21 PM
Add condition to formula Pat Excel Worksheet Functions 0 November 16th 04 12:23 PM


All times are GMT +1. The time now is 10:32 PM.

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"