Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Format subtracting 1
I would like to format a cell that each time a number is typed in it will
subtract 1 from that number. I do not want to put a formula in another colum to do this, just when I type in a 5 for example the 5 would change to a 4. Can this be done? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Format subtracting 1
Simple, put 1 less of the actual number
"Wendy" wrote: I would like to format a cell that each time a number is typed in it will subtract 1 from that number. I do not want to put a formula in another colum to do this, just when I type in a 5 for example the 5 would change to a 4. Can this be done? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Format subtracting 1
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target If IsNumeric(.Value) Then .Value = .Value - 1 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 -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Wendy" wrote in message ... I would like to format a cell that each time a number is typed in it will subtract 1 from that number. I do not want to put a formula in another colum to do this, just when I type in a 5 for example the 5 would change to a 4. Can this be done? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Format subtracting 1
LOL! think of a number, and subtract 1.
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Teethless mama" wrote in message ... Simple, put 1 less of the actual number "Wendy" wrote: I would like to format a cell that each time a number is typed in it will subtract 1 from that number. I do not want to put a formula in another colum to do this, just when I type in a 5 for example the 5 would change to a 4. Can this be done? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cell Format subtracting 1
Wendy
How about a Spinner from the Forms toolbar. Then you could go down or up as you choose. Gord Dibben MS Excel MVP On Tue, 6 Feb 2007 14:57:00 -0800, Wendy wrote: I would like to format a cell that each time a number is typed in it will subtract 1 from that number. I do not want to put a formula in another colum to do this, just when I type in a 5 for example the 5 would change to a 4. Can this be done? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
Cell data format | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
can't format cell - have tried unlocking and unprotecting | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions |