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

Как увеличить размер шрифта выпадающего списка в Excel?

doc увеличить размер шрифта раскрывающийся список 1

Выпадающий список - очень полезная функция в Excel, когда вы создаете раскрывающийся список на своем листе, пробовали ли вы когда-нибудь увеличить размер шрифта раскрывающегося списка, чтобы сделать выбранную запись больше и более читаемой, как показано на скриншоте слева? В этой статье будет рассказано об обходном пути для ее решения.

Увеличьте размер шрифта раскрывающегося списка с помощью кода VBA, чтобы увеличить масштаб


Увеличьте размер шрифта раскрывающегося списка с помощью кода VBA, чтобы увеличить масштаб

На самом деле, у нас нет прямого способа увеличить размер шрифта раскрывающегося списка, но вы можете применить следующий код VBA, чтобы изменить настройку масштабирования ячеек раскрывающегося списка, чтобы текст выглядел больше. Пожалуйста, сделайте следующее:

1. Перейдите на рабочий лист, содержащий раскрывающийся список, размер шрифта которого вы хотите увеличить.

2. Щелкните правой кнопкой мыши вкладку листа и выберите Просмотреть код из контекстного меню во всплывающем Microsoft Visual Basic для приложений окна, скопируйте и вставьте следующий код в пустое Модули окна:

Код VBA: увеличьте размер шрифта раскрывающегося списка, чтобы увеличить масштаб ячейки

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'updateby Extendoffice
    On Error GoTo LZoom
    Dim xZoom As Long
    xZoom = 100
    If Target.Validation.Type = xlValidateList Then xZoom = 130
LZoom:
    ActiveWindow.Zoom = xZoom
End Sub

3. Затем сохраните и закройте этот код, теперь, когда вы щелкаете ячейки раскрывающегося списка, масштаб ячейки будет увеличен, а раскрывающийся список будет казаться больше, но, когда вы щелкнете другие ячейки, не содержащие раскрывающегося списка, увеличение ячейки будет нормальным.

Внимание: В приведенном выше коде хЗум = 130 изменит масштаб ячеек раскрывающегося списка на 130, вы можете изменить это значение масштабирования по своему усмотрению.


Создать выпадающий список с флажками в Excel

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


Демонстрация: увеличьте размер шрифта раскрывающегося списка с помощью кода VBA, чтобы увеличить масштаб

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

🤖 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 (29)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks so much!
This comment was minimized by the moderator on the site
I have multiple drop down buttons. The VBA code was working fine at the first attempt. But i had to change the layout of the form requiring movement of all the cells. Now, all the drop down cells works except for one. I tried deleting and repasting the code. The problem persist, all cells works except for that one. Please help.
This comment was minimized by the moderator on the site
Ale po zamknięciu pliku i ponownym go otwarciu to rozwiązanie już nie działa.
This comment was minimized by the moderator on the site
OKI. Trzeba zapisać plik z obsługą makra.
This comment was minimized by the moderator on the site
Hello friend,
You are right. We need to save the macro-enabled file so the solution can work. Have a great day.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
Can we do this for multiple drop box? If not, then what is procedure for multiple drop box.
This comment was minimized by the moderator on the site
Ocurre al revés. Al dar clic en cualquiera celda se agranda, pero no en la lista desplegable y no vuelve al tamaño original. Uso Excel 2010. ¿Solución?It happens the other way around. Clicking on any cell enlarges it, but not the dropdown list and it does not return to the original size. I use Excel 2010. Solution?
This comment was minimized by the moderator on the site
Thank You for the tip to zoom the size of the font in the drop down box. It did the trick.
This comment was minimized by the moderator on the site
Hi, Just question i have pasted the code onto blank Module window (Right click in view code). Once i save, is function well that was good. But when i close the file and re-open it, the code was gone and no more enlarge for the drop down list. Can i know how to set for permanent use?
This comment was minimized by the moderator on the site
Hello, Ace,
To save the code, you should save the Excel file as Excel Macro-Enabled Workbook format. Please try it.
This comment was minimized by the moderator on the site
I have multiple dropdowns and only need one bigger as the rest are yes/no. But the code you shared is doing this for all of them. How do I only this to be used for one dropdown only?
This comment was minimized by the moderator on the site
Hello, Yvonne
To apply the code only to one cell, the following code may help you: (Note: in the code, change the cell I2 to your own cell reference.)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'updateby Extendoffice
    On Error GoTo LZoom
    Dim xZoom As Long
    Dim xRg As Range
    xZoom = 100
    Set xRg = Range("I2")
    If Not Intersect(Target, xRg) Is Nothing Then
        If Target.Validation.Type = xlValidateList Then xZoom = 130
    End If
LZoom:
    ActiveWindow.Zoom = xZoom
End Sub

Please try, hope it can help you!
This comment was minimized by the moderator on the site
How can I apply this font change size to only one column? I have several columns with drop-down boxes and I only want one specific column to change font size?
This comment was minimized by the moderator on the site
This zooms the whole sheet to 130%
How do I increase only the drop menu ?
This comment was minimized by the moderator on the site
Hello, Dave,
To only increase the drop down menu, here is a workaround to solve it.

First, after inserting the drop down list in your worksheet, then you should insert an Combo Box (ActiveX Controls),and then apply the following VBA code into the sheet module code:

Dim xRg As Range
Private Sub ComboBox1_Change()
On Error Resume Next
xRg.Value = Me.ComboBox1.Text
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo LblExit
With Me.ComboBox1
.Visible = False
If Target.Validation.Type = xlValidateList Then
Target.Validation.InCellDropdown = False
.ListWidth = 120
.ListFillRange = ""
.ListFillRange = Target.Validation.Formula1
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width
.Height = Target.Height
.Font.Size = 16
.Visible = True
Set xRg = Target
End If
End With
LblExit:
End Sub

After inserting the code, now when you click the drop down list cell, a combo box will be displayed, and font size in the drop down menu is increased as you need. And the inserted combo box will be hidden automatically.

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
Can you explain it step by step for dummies pls?
This comment was minimized by the moderator on the site
Hello, ITALO,
1. Insert the drop down you need in your worksheet;
2. Then insert a Combo Box (ActiveX Controls) by clicking Developer > Insert > Combo Box (ActiveX Controls), and then drag the mouse to draw a Combo Box object;
3. And then, right click your current used worksheet, choose View Code, and paste the above code into the module;
4. At last, click Design Mode under the Developer tab to disable it.
5. Now when you click the drop down list cell, a combo box will be displayed, and font size in the drop down menu is increased as you need.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
GENIUS! Thank you Skyyang! So grateful for your method! Works like a charm!
This comment was minimized by the moderator on the site
After using this code, I can't use return key on Excel. How can I code (install) return key?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations