Перейти к основному содержанию

Как автоматически переместить курсор в определенную ячейку в Excel?

Иногда вам может потребоваться перейти к определенной ячейке для какой-то цели. Эта статья подробно расскажет вам о способах перемещения курсора в определенную ячейку.

Автоматически перемещать курсор в определенную ячейку с полем имени
Автоматическое перемещение курсора в определенную ячейку с кодом VBA


Автоматически перемещать курсор в определенную ячейку с полем имени

Поле имени может помочь вам легко переместить курсор в определенную ячейку в Excel.

1. в Фамилия введите конкретную ссылку на ячейку, к которой вы перейдете, а затем нажмите Enter .

Затем курсор сразу переместится в указанную ячейку.

Внимание: Если вам нужно перейти к указанной ячейке на другом листе, например, перейти к ячейке C30 Листа 2, введите Лист2! C30 в поле Имя и нажмите клавишу Enter.


Автоматическое перемещение курсора в определенную ячейку с кодом VBA

Следующий код VBA поможет вам сразу перейти к определенной ячейке в Excel.

1. Нажмите другой + F11 клавиши одновременно, чтобы открыть Microsoft Visual Basic для приложений окно.

2. в Microsoft Visual Basic для приложений окно, дважды щелкните Tего рабочая тетрадь на левой панели, чтобы открыть ThisWorkbook (Код) окно. Затем скопируйте и вставьте в окно приведенный ниже код VBA.

Код VBA: переход к началу или началу следующей строки для ввода данных

Sub jumpnext()
    Range("F100").Select
End Sub

Внимание: В коде F100 - это указанная ячейка, к которой вы перейдете. Вы можете изменить его по своему усмотрению.

3. нажмите F5 чтобы запустить код, курсор сразу переместится в ячейку F100 на текущем листе.


Статьи по теме:

Лучшие инструменты для офисной работы

🤖 Kutools AI Помощник: Революционный анализ данных на основе: Интеллектуальное исполнение   |  Генерировать код  |  Создание пользовательских формул  |  Анализ данных и создание диаграмм  |  Вызов функций Kutools...
Популярные опции: Найдите, выделите или определите дубликаты   |  Удалить пустые строки   |  Объедините столбцы или ячейки без потери данных   |   Раунд без формулы ...
Супер поиск: Множественный критерий VLookup    VLookup с несколькими значениями  |   VLookup по нескольким листам   |   Нечеткий поиск ....
Расширенный раскрывающийся список: Быстрое создание раскрывающегося списка   |  Зависимый раскрывающийся список   |  Выпадающий список с множественным выбором ....
Менеджер столбцов: Добавить определенное количество столбцов  |  Переместить столбцы  |  Переключить статус видимости скрытых столбцов  |  Сравнить диапазоны и столбцы ...
Рекомендуемые функции: Сетка Фокус   |  Просмотр дизайна   |   Большой Формулный Бар    Менеджер книг и листов   |  Библиотека ресурсов (Авто текст)   |  Выбор даты   |  Комбинировать листы   |  Шифровать/дешифровать ячейки    Отправлять электронные письма по списку   |  Суперфильтр   |   Специальный фильтр (фильтровать жирным шрифтом/курсивом/зачеркиванием...) ...
15 лучших наборов инструментов12 Текст Инструменты (Добавить текст, Удалить символы, ...)   |   50+ График Тип (Диаграмма Ганта, ...)   |   40+ Практических Формулы (Рассчитать возраст по дню рождения, ...)   |   19 Вносимые Инструменты (Вставить QR-код, Вставить изображение из пути, ...)   |   12 Конверсия Инструменты (Числа в слова, Конверсия валюты, ...)   |   7 Слияние и разделение Инструменты (Расширенные ряды комбинирования, Разделить клетки, ...)   |   ... и более

Улучшите свои навыки работы с Excel с помощью Kutools for Excel и почувствуйте эффективность, как никогда раньше. Kutools for Excel предлагает более 300 расширенных функций для повышения производительности и экономии времени.  Нажмите здесь, чтобы получить функцию, которая вам нужна больше всего...

Описание


Вкладка Office: интерфейс с вкладками в Office и упрощение работы

  • Включение редактирования и чтения с вкладками в Word, Excel, PowerPoint, Издатель, доступ, Visio и проект.
  • Открывайте и создавайте несколько документов на новых вкладках одного окна, а не в новых окнах.
  • Повышает вашу продуктивность на 50% и сокращает количество щелчков мышью на сотни каждый день!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Dear,
Please help me how to code : I want to move down row by row on tthe data already fillter
Current cursor at A6 (fix) because it 's Row Header, I want to move down :
Step 1 : move down to A9
Step 2 : move down to A11
Step 3 : move down to A15
(Do until blank)
Screenshot 2023-11-30 200730
(Please see srceen shot attacked)

Many Thanks
Ky
This comment was minimized by the moderator on the site
Sub jumpnext()
Range("F100").Select
End Sub

What chnage do i have to do so this code can be uased on all sheets of the workbook at the same time.

Regards,
This comment was minimized by the moderator on the site
Hi arvind,

The following VBA code can do you a favor. Please give it a try. Thank you.
Note: You need to put the VBA code in the ThisWorkbook (Code) editor.
Sub jumpnext()
'Updated by Extendoffice 20230109
Set CurrWS = ActiveSheet
    For Each WS In ThisWorkbook.Worksheets
    WS.Activate
        WS.Range("F100").Select
    Next
    CurrWS.Activate
End Sub

https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/select-same-cell.png
This comment was minimized by the moderator on the site
Hi,

Can you help with the following VBA code request please?

Sheet 1 is named "Master Asset" with a further 100 sheets named as "0001...0002...0003....0004 ~ 0100"

In any of each of the sheets "0001 ~ 0100"
I want to be able to select cell A4 which already contains text "Back to Master Asset" then press enter, to automatically jump back to cell J3 in the "Master Asset"

Thanks in advance.
Andy C.
This comment was minimized by the moderator on the site
Hi Andy Coghlan,
I can't find a way to trigger the macro with the enter key right now. The following VBA code can insert the same hyperlink in A4 of all worksheets at the same time. After clicking the hyperlink in A4, it will jump to J3 in the "Master Asset". Please give it a try.

Sub AddHyperlinks()
'Updated by Extendoffice 20220715
    Dim xRg, yRg As Range
    Set xRg = Worksheets("Master Asset").Range("J3")
    xStr = xRg.Address(External:=True)
    For Each Sh In Worksheets
        If Sh.Name <> "Sh.Name" Then
            Set yRg = Sh.Range("A4")
            yRg.Hyperlinks.Add anchor:=yRg, Address:="", SubAddress:=xStr, TextToDisplay:="Back to Master Asset"
        End If
    Next
End Sub
This comment was minimized by the moderator on the site
Bagiaimana mengisi textbox pada form dengan memilih data di cell/sheet yg dipilih dgn kursor ?
This comment was minimized by the moderator on the site
Hi Lelson,
Sorry I don't understand what you mean. Would you mind providing a screenshot of your data? Or try to be more specific about your question. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
you didn't sign the F5 for teh code, how it is gonna run by pressing F5?
This comment was minimized by the moderator on the site
Is it possible to move the active cell without pressing a key on the keyboard? For example, can I have the cell move down as soon as the cell above it is filled? I am looking for either a function or a VBA to run when a cell is filled. As soon as A3 has characters in it, is there a VBA to move the active cell down to A4?
This comment was minimized by the moderator on the site
Hi John,
I am confused on your question. How can we know if the cell is finish editing?
This comment was minimized by the moderator on the site
Sorry I mean to type "instantly jump to F8"
This comment was minimized by the moderator on the site
Hi James,
Please try the below code. After data has been entered into E6, press the Tab key or the Enter key, and the cursor will jump to F8 instantly.

Private Sub Worksheet_Change(ByVal Target As Range)

'Updated by Extendoffice 2020087

Dim tabArray As Variant

Dim i As Long

tabArray = Array("E6", "F8")

Application.ScreenUpdating = False

For i = LBound(tabArray) To UBound(tabArray)

If tabArray(i) = Target.Address(0, 0) Then

If i = UBound(tabArray) Then

Me.Range(tabArray(LBound(tabArray))).Select

Else

Me.Range(tabArray(i + 1)).Select

End If

End If

Next i

Application.ScreenUpdating = True

End Sub
This comment was minimized by the moderator on the site
How would I have the cursor move from Cell E6 to F8 once data has been entered into E6? I would like the cursor to ignore all the other lines in the E column and instantly jump to E6.
This comment was minimized by the moderator on the site
That's helpful thanks. However I would like to have a formula as the argument for the 'Range' function. Is this permissible? What I would like to do is have the user enter a number in a dialog box, then search for the first occurrence of that number in a range of cells, and then jump the cursor to that cell...
This comment was minimized by the moderator on the site
Hi Steve,
Sorry can't help you with that.
This comment was minimized by the moderator on the site
I'd like to make a macro that moves from one cell to the next, step by step.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations