Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could write some VB to do this, however cumbersome it may be. Assuming
that the cell you want to become 120 is "A1" and the 'X' is in cell "B1": ' This event is called with the new selection; work with the previous selection Dim lastRange As Range Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' lastRange is not set first time through On Error Resume Next ' Is the the cell? (A1) If (lastRange.Row = 1 And lastRange.Column = 1) Then ' ... if the number in the cell (A1) is greater than x (B1) If (Range("A1") Range("B1")) Then ' put 120 in the cell Range("A1") = 120 End If End If ' Restore error handling On Error GoTo 0 ' Keep whatever the current selection is Set lastRange = Target End Sub Its up to you to detect the cell you want to change, to find the value for X, to properly initialize lastRange, and to determine if this is more hassle (and overhead) than its worth! "SeattleBumm" wrote: My email address is I want to have a cell such that if the number in the cell is greater than X, the formula puts 120 in the cell. Thanks for your help! Please send me an email if you know how to do this! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match then lookup | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
Creating a check mark box | Setting up and Configuration of Excel | |||
Match / Vlookup within an Array formula | Excel Discussion (Misc queries) |