A
A
AlexVrag2013-04-28 21:06:07
Microsoft
AlexVrag, 2013-04-28 21:06:07

Jump to the desired cell by enter (Excel)

The data is entered in the "q-st" and "price" fields, it is necessary that after entering the "price" field, the cursor should go down to "q-st" and so on. to the end of the table.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bmforce, 2013-04-28
@bmforce

Using macros, this problem could be solved something like this:

Sub myMacro()

    Dim sheet As Worksheet
    Set sheet = ActiveWorkbook.ActiveSheet
    If sheet.Cells(1, ActiveCell.column).Value = "ціна" Then
        sheet.Cells(ActiveCell.Row + 1, ActiveCell.column - 1).Activate
    End If
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.OnKey "{ENTER}"
End Sub

Private Sub Workbook_Open()
    Application.OnKey "{ENTER}", "myMacro"
End Sub

You can use the Worksheet_Change event to not be bound to pressing the Enter key.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question