Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Default Values
Is it possible to have a conditional default value, for example, if I enter a value in one cell, it would automatically add another value. But it would allow a person to manually override the value without deleting the formula? For example.. A1 B1 10 < User enters 11.75 < Excel suggests -- StevenAFC ------------------------------------------------------------------------ StevenAFC's Profile: http://www.excelforum.com/member.php...o&userid=36471 View this thread: http://www.excelforum.com/showthread...hreadid=562365 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Default Values
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A10" '<=== Change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Select Case .Value Case 10: .Offset(0, 1).Value = 11.75 Case 11: .Offset(0, 1).Value = 11.25 Case 12: .Offset(0, 1).Value = 15 Case 13: .Offset(0, 1).Value = 22 'etc. End Select .Offset(0, 1).Select End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "StevenAFC" wrote in message ... Is it possible to have a conditional default value, for example, if I enter a value in one cell, it would automatically add another value. But it would allow a person to manually override the value without deleting the formula? For example.. A1 B1 10 < User enters 11.75 < Excel suggests -- StevenAFC ------------------------------------------------------------------------ StevenAFC's Profile: http://www.excelforum.com/member.php...o&userid=36471 View this thread: http://www.excelforum.com/showthread...hreadid=562365 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Default Values
Thanks for the reply, i thought i might have to go down the VBA/Macro route. -- StevenAFC ------------------------------------------------------------------------ StevenAFC's Profile: http://www.excelforum.com/member.php...o&userid=36471 View this thread: http://www.excelforum.com/showthread...hreadid=562365 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Match function with duplicate values in an array | Excel Worksheet Functions | |||
How do I generate a list from a range of values | Excel Worksheet Functions | |||
Setting default values in a drop down list in excel? | Excel Discussion (Misc queries) | |||
resetting excel to default values | Excel Discussion (Misc queries) | |||
Return Consecutive Values - Pairs | Excel Worksheet Functions |