Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically tab?
I am trying to enter one digit numbers to cells. I would like for Excel to
automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically tab?
Not possible. There is no buillt in feature to allow this and macros are
suspended while you are entering data in a cell. -- HTH... Jim Thomlinson "HJB1954" wrote: I am trying to enter one digit numbers to cells. I would like for Excel to automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically tab?
Without knowing what "the next cell" means...
Saved from a previous post: I would turn tools|options|edit tab|move selection after enter to down or right or ... Then turn number lock on and use the numeric keypad to type your digit Hitting the enter key on the numeric keypad doesn't seem too bad to me. Another alternative is to create a tiny userform that just looks for a digit: Put a single textbox on it (use the X button to close the userform). Put this code in a General module: Option Explicit Sub testme01() Cells(ActiveCell.Row, 1).Activate UserForm1.Show End Sub Add this code to the userform module: Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case 48-57 'Numbers 0-9 With ActiveCell .Value = Chr(KeyAscii) 'A:E, then down a row if activecell.column = 5 then activecell.entirerow.cells(1).offset(1,0).activate else .Offset(0, 1).Activate end if End With End Select KeyAscii = 0 TextBox1.Value = "" End Sub This code goes from A:E then next row, column A. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Debra Dalgleish has some getstarted instructions for userforms at: http://contextures.com/xlUserForm01.html HJB1954 wrote: I am trying to enter one digit numbers to cells. I would like for Excel to automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically t
Not the answer I wanted to hear, but at least I know. Thanks for responding.
Harold Buchanan "Jim Thomlinson" wrote: Not possible. There is no buillt in feature to allow this and macros are suspended while you are entering data in a cell. -- HTH... Jim Thomlinson "HJB1954" wrote: I am trying to enter one digit numbers to cells. I would like for Excel to automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically t
Wow! I am afraid I am in over my head. I have written a program that
calculates the bets we have made while playing golf. As each team comes in, they give me the scores for each hole. I then enter them and the simple programming I have done calculates the bets. As they call out, 5, 4, 3, 5, 4, 2, 4,4,4, I would like to be able to go to the cell for hole number one and enter 5. Will the formula you wrote let me enter 5 and then go to the cell which is adjacent to it and enter 4 without having to tab to that cell. If so, I will get more familiar with userforms and use your suggestion. Thanks for responding. Harold Buchanan "Dave Peterson" wrote: Without knowing what "the next cell" means... Saved from a previous post: I would turn tools|options|edit tab|move selection after enter to down or right or ... Then turn number lock on and use the numeric keypad to type your digit Hitting the enter key on the numeric keypad doesn't seem too bad to me. Another alternative is to create a tiny userform that just looks for a digit: Put a single textbox on it (use the X button to close the userform). Put this code in a General module: Option Explicit Sub testme01() Cells(ActiveCell.Row, 1).Activate UserForm1.Show End Sub Add this code to the userform module: Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case 48-57 'Numbers 0-9 With ActiveCell .Value = Chr(KeyAscii) 'A:E, then down a row if activecell.column = 5 then activecell.entirerow.cells(1).offset(1,0).activate else .Offset(0, 1).Activate end if End With End Select KeyAscii = 0 TextBox1.Value = "" End Sub This code goes from A:E then next row, column A. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Debra Dalgleish has some getstarted instructions for userforms at: http://contextures.com/xlUserForm01.html HJB1954 wrote: I am trying to enter one digit numbers to cells. I would like for Excel to automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I limit a cell to one digit and have it automatically t
It's not a formula--it's a macro.
It will allow you to enter a single digit and go to the adjacent cell. You may have to modify the code so that it goes to the next row after the 9th entry, though. HJB1954 wrote: Wow! I am afraid I am in over my head. I have written a program that calculates the bets we have made while playing golf. As each team comes in, they give me the scores for each hole. I then enter them and the simple programming I have done calculates the bets. As they call out, 5, 4, 3, 5, 4, 2, 4,4,4, I would like to be able to go to the cell for hole number one and enter 5. Will the formula you wrote let me enter 5 and then go to the cell which is adjacent to it and enter 4 without having to tab to that cell. If so, I will get more familiar with userforms and use your suggestion. Thanks for responding. Harold Buchanan "Dave Peterson" wrote: Without knowing what "the next cell" means... Saved from a previous post: I would turn tools|options|edit tab|move selection after enter to down or right or ... Then turn number lock on and use the numeric keypad to type your digit Hitting the enter key on the numeric keypad doesn't seem too bad to me. Another alternative is to create a tiny userform that just looks for a digit: Put a single textbox on it (use the X button to close the userform). Put this code in a General module: Option Explicit Sub testme01() Cells(ActiveCell.Row, 1).Activate UserForm1.Show End Sub Add this code to the userform module: Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case 48-57 'Numbers 0-9 With ActiveCell .Value = Chr(KeyAscii) 'A:E, then down a row if activecell.column = 5 then activecell.entirerow.cells(1).offset(1,0).activate else .Offset(0, 1).Activate end if End With End Select KeyAscii = 0 TextBox1.Value = "" End Sub This code goes from A:E then next row, column A. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Debra Dalgleish has some getstarted instructions for userforms at: http://contextures.com/xlUserForm01.html HJB1954 wrote: I am trying to enter one digit numbers to cells. I would like for Excel to automatically tab me to the next cell without having to hit the enter or tab key. Is it possible?? Thanks, Harold Buchanan -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
last digit automatically changes to zero (0) | Excel Worksheet Functions | |||
last digit automatically changes to zero (0) | Excel Worksheet Functions | |||
Can excel limit the characters in a cell to 28 automatically? | Excel Worksheet Functions | |||
Color a single digit in a mult-digit number cell | Excel Discussion (Misc queries) | |||
Can I change the 15-digit limit in Excel for numbers ? | Excel Worksheet Functions |