How to make buttons in excel

You can insert form controls such as check boxes or option buttons to make data entry easier. Check boxes work well for forms with multiple options. Option buttons are better when your user has just one choice.

Sample check boxes
Sample radio button controls

To add either a check box or an option button, you’ll need the Developer tab on your Ribbon.

Notes: To enable the Developer tab, follow these instructions:

  • In Excel 2010 and subsequent versions, click File > Options > Customize Ribbon , select the Developer check box, and click OK.

  • In Excel 2007, click the Microsoft Office button Office button image > Excel Options > Popular > Show Developer tab in the Ribbon.

  1. To add a check box, click the Developer tab, click Insert, and under Form Controls, click Button image.

    the check box control on the ribbon

    To add an option button, click the Developer tab, click Insert, and under Form Controls, click Button image.

    the radio button control on the ribbon

  2. Click in the cell where you want to add the check box or option button control.

    Tip: You can only add one checkbox or option button at a time. To speed things up, after you add your first control, right-click it and select Copy > Paste.

  3. To edit or remove the default text for a control, click the control, and then update the text as needed.

    edit text for a form control

Tip: If you can’t see all of the text, click and drag one of the control handles until you can read it all. The size of the control and its distance from the text can’t be edited.

Formatting a control

After you insert a check box or option button, you might want to make sure that it works the way you want it to. For example, you might want to customize the appearance or properties.

Note: The size of the option button inside the control and its distance from its associated text cannot be adjusted.

  1. To format a control, right-click the control, and then click Format Control.

    the Format Control dialog box options

  2. In the Format Control dialog box, on the Control tab, you can modify any of the available options:

    • Checked: Displays an option button that is selected.

    • Unchecked: Displays an option button that is cleared.

    • In the Cell link box, enter a cell reference that contains the current state of the option button.

      The linked cell returns the number of the selected option button in the group of options. Use the same linked cell for all options in a group. The first option button returns a 1, the second option button returns a 2, and so on. If you have two or more option groups on the same worksheet, use a different linked cell for each option group.

      Use the returned number in a formula to respond to the selected option.

      For example, a personnel form, with a Job type group box, contains two option buttons labeled Full-time and Part-time linked to cell C1. After a user selects one of the two options, the following formula in cell D1 evaluates to «Full-time» if the first option button is selected or «Part-time» if the second option button is selected.

      =IF(C1=1,»Full-time»,»Part-time»)

      If you have three or more options to evaluate in the same group of options, you can use the CHOOSE or LOOKUP functions in a similar manner.

  3. Click OK.

Deleting a control

  • Right-click the control, and press DELETE.

Currently, you can’t use check box controls in Excel for the web. If you’re working in Excel for the web and you open a workbook that has check boxes or other controls (objects), you won’t be able to edit the workbook without removing these controls.

Important: If you see an «Edit in the browser?» or «Unsupported features» message and choose to edit the workbook in the browser anyway, all objects such as check boxes, combo boxes will be lost immediately. If this happens and you want these objects back, use Previous Versions to restore an earlier version.

If you have the Excel desktop application, click Open in Excel and add check boxes or option buttons.

Содержание

  • Процедура создания
    • Способ 1: автофигура
    • Способ 2: стороннее изображение
    • Способ 3: элемент ActiveX
    • Способ 4: элементы управления формы
  • Вопросы и ответы

Кнопка в Microsoft Excel

Excel является комплексным табличным процессором, перед которым пользователи ставят самые разнообразные задачи. Одной из таких задач является создание кнопки на листе, нажатие на которую запускало бы определенный процесс. Данная проблема вполне решаема с помощью инструментария Эксель. Давайте разберемся, какими способами можно создать подобный объект в этой программе.

Процедура создания

Как правило, подобная кнопка призвана выступать в качестве ссылки, инструмента для запуска процесса, макроса и т.п. Хотя в некоторых случаях, данный объект может являться просто геометрической фигурой, и кроме визуальных целей не нести никакой пользы. Данный вариант, впрочем, встречается довольно редко.

Способ 1: автофигура

Прежде всего, рассмотрим, как создать кнопку из набора встроенных фигур Excel.

  1. Производим перемещение во вкладку «Вставка». Щелкаем по значку «Фигуры», который размещен на ленте в блоке инструментов «Иллюстрации». Раскрывается список всевозможных фигур. Выбираем ту фигуру, которая, как вы считаете, подойдет более всего на роль кнопки. Например, такой фигурой может быть прямоугольник со сглаженными углами.
  2. Выбор фигуры в Microsoft Excel

  3. После того, как произвели нажатие, перемещаем его в ту область листа (ячейку), где желаем, чтобы находилась кнопка, и двигаем границы вглубь, чтобы объект принял нужный нам размер.
  4. Сдвиг границ в Microsoft Excel

  5. Теперь следует добавить конкретное действие. Пусть это будет переход на другой лист при нажатии на кнопку. Для этого кликаем по ней правой кнопкой мыши. В контекстном меню, которое активируется вслед за этим, выбираем позицию «Гиперссылка».
  6. Добавление гиперссылки в Microsoft Excel

  7. В открывшемся окне создания гиперссылки переходим во вкладку «Местом в документе». Выбираем тот лист, который считаем нужным, и жмем на кнопку «OK».

Окно создания гиперссылки в Microsoft Excel

Теперь при клике по созданному нами объекту будет осуществляться перемещение на выбранный лист документа.

Кнопка создана в Microsoft Excel

Урок: Как сделать или удалить гиперссылки в Excel

Способ 2: стороннее изображение

В качестве кнопки можно также использовать сторонний рисунок.

  1. Находим стороннее изображение, например, в интернете, и скачиваем его себе на компьютер.
  2. Открываем документ Excel, в котором желаем расположить объект. Переходим во вкладку «Вставка» и кликаем по значку «Рисунок», который расположен на ленте в блоке инструментов «Иллюстрации».
  3. Переход к выбору рисунка в Microsoft Excel

  4. Открывается окно выбора изображения. Переходим с помощью него в ту директорию жесткого диска, где расположен рисунок, который предназначен выполнять роль кнопки. Выделяем его наименование и жмем на кнопку «Вставить» внизу окна.
  5. Окно выбора рисунка в Microsoft Excel

  6. После этого изображение добавляется на плоскость рабочего листа. Как и в предыдущем случае, его можно сжать, перетягивая границы. Перемещаем рисунок в ту область, где желаем, чтобы размещался объект.
  7. Выравнивание размеров кнопки в Microsoft Excel

    Lumpics.ru

  8. После этого к копке можно привязать гиперссылку, таким же образом, как это было показано в предыдущем способе, а можно добавить макрос. В последнем случае кликаем правой кнопкой мыши по рисунку. В появившемся контекстном меню выбираем пункт «Назначить макрос…».
  9. Переход к назначению макроса в Microsoft Excel

  10. Открывается окно управление макросами. В нем нужно выделить тот макрос, который вы желаете применять при нажатии кнопки. Этот макрос должен быть уже записан в книге. Следует выделить его наименование и нажать на кнопку «OK».

Выбор макроса в Microsoft Excel

Теперь при нажатии на объект будет запускаться выбранный макрос.

Кнопка на листе в Microsoft Excel

Урок: Как создать макрос в Excel

Способ 3: элемент ActiveX

Наиболее функциональной кнопку получится создать в том случае, если за её первооснову брать элемент ActiveX. Посмотрим, как это делается на практике.

  1. Для того чтобы иметь возможность работать с элементами ActiveX, прежде всего, нужно активировать вкладку разработчика. Дело в том, что по умолчанию она отключена. Поэтому, если вы её до сих пор ещё не включили, то переходите во вкладку «Файл», а затем перемещайтесь в раздел «Параметры».
  2. Перемещение в раздел Параметры в Microsoft Excel

  3. В активировавшемся окне параметров перемещаемся в раздел «Настройка ленты». В правой части окна устанавливаем галочку около пункта «Разработчик», если она отсутствует. Далее выполняем щелчок по кнопке «OK» в нижней части окна. Теперь вкладка разработчика будет активирована в вашей версии Excel.
  4. Включение режима разработчика в Microsoft Excel

  5. После этого перемещаемся во вкладку «Разработчик». Щелкаем по кнопке «Вставить», расположенной на ленте в блоке инструментов «Элементы управления». В группе «Элементы ActiveX» кликаем по самому первому элементу, который имеет вид кнопки.
  6. Создание кнопки через элементы ActiveX в Microsoft Excel

  7. После этого кликаем по любому месту на листе, которое считаем нужным. Сразу вслед за этим там отобразится элемент. Как и в предыдущих способах корректируем его местоположение и размеры.
  8. Элемент ActiveX в Microsoft Excel

  9. Кликаем по получившемуся элементу двойным щелчком левой кнопки мыши.
  10. Щелчок по элементу ActiveX в Microsoft Excel

  11. Открывается окно редактора макросов. Сюда можно записать любой макрос, который вы хотите, чтобы исполнялся при нажатии на данный объект. Например, можно записать макрос преобразования текстового выражения в числовой формат, как на изображении ниже. После того, как макрос записан, жмем на кнопку закрытия окна в его правом верхнем углу.

Редактор макросов в Microsoft Excel

Теперь макрос будет привязан к объекту.

Способ 4: элементы управления формы

Следующий способ очень похож по технологии выполнения на предыдущий вариант. Он представляет собой добавление кнопки через элемент управления формы. Для использования этого метода также требуется включение режима разработчика.

  1. Переходим во вкладку «Разработчик» и кликаем по знакомой нам кнопке «Вставить», размещенной на ленте в группе «Элементы управления». Открывается список. В нем нужно выбрать первый же элемент, который размещен в группе «Элементы управления формы». Данный объект визуально выглядит точно так же, как и аналогичный элемент ActiveX, о котором мы говорили чуть выше.
  2. Создание элемента управления формы в Microsoft Excel

  3. Объект появляется на листе. Корректируем его размеры и место расположения, как уже не раз делали ранее.
  4. Объект на листе в Microsoft Excel

  5. После этого назначаем для созданного объекта макрос, как это было показано в Способе 2 или присваиваем гиперссылку, как было описано в Способе 1.

Кнопка на листе в программе Microsoft Excel

Как видим, в Экселе создать функциональную кнопку не так сложно, как это может показаться неопытному пользователю. К тому же данную процедуру можно выполнить с помощью четырех различных способов на свое усмотрение.

Еще статьи по данной теме:

Помогла ли Вам статья?

Home / Excel Basics / How to Add a Button in Excel

In Excel, users can add macro-enabled buttons on the worksheets and can run macros by just clicking on them.

Users can use these macro-enabled buttons to perform several different tasks like filtering data, selecting data, printing a worksheet, running formulas, and calculations just by clicking on the buttons.

Adding buttons and embedding the macros to them is easier. Excel has multiple ways to add the macro-enabled buttons to the worksheet. Below, we have some quick and easy ways mentioned for you to add the macro buttons in Excel.

Add Macro Buttons Using Shapes

Users can create buttons in excel using shapes. Creating buttons using shapes has more formatting options over the buttons created from Control buttons or ActiveX buttons. Users can change the design, color, font, and style of the button created using shapes.

  1. First, go to the “Insert” tab and then click on the “Illustrations” icon” then click on the “Shapes” option and select any rectangle button.
    1-illustration-shapes-icon
  2. After that, with the help of a mouse, draw the rectangular button on the worksheet.
    2-draw-a-rectangular-button
  3.  Now, to enter the text in the button, double-click on the button and insert the text.
    3-enter-text-to-the-button
  4. For formatting, go to the “Shape Format” tab and you will get multiple options for the formatting of the button.
  5. From here, you can format the font style, font color, button color, button effects, and much more.
    4-shape-format-tab
  6. To edit the text, add the hyperlink, or add the macro, just right-click on the button and you will get the pop-up menu with multiple options.
  7. From here, you can edit the text, add the hyperlink, and can add the macro to the button.
  8. Now, select the “Assign Macro” option to add the macro to the button.
    5-right-click-on-the-button
  9. Once you select the “Assign Macro” option, you will get the “Assign Macro” dialogue box opened.
  10. From here, select the macro and click OK.
    6-assign-macro-window
  11. At this point, the button has become micro enabled, and when you move your cursor on the button, the cursor turns to the hand point cursor.
    7-micro-enabled-button
  12. To freeze the button movement, right-click on the button and select the “Format Shape” and select the option “Don’t move or size with cells”.
    8-freeze-the-button

Add Macro Buttons Using Form Controls

  1. First, go to the “Developer” tab and click on the “Insert” icon under the “Control” group on the ribbon.
    9-developer-tab
  2. After that, select the first button option from the “Form Controls” menu and draw a button on the worksheet.
    10-form-controls-button
  3. Now, select or type the macro name from the “Assign Macro” dialogue box and click OK.
  4. If you don’t have any macro created yet, you can click cancel to add the macro at a later stage.
    11-assign-macro-dialogue-box-
  5. From here, right-click on the button and select “Assign Macro” to add the macro to the button if did not assign yet.
  6. To format the button font size, style, color, etc. select the “Format Control” option.
    12-right-click-the-button
  7. Once you click on “Format Control”, you will get the “Format Control” window open and then can do the button font formatting.
    13-format-control-window
  8. To freeze the button movement, select the “Properties” tab and select the option “Don’t move or size with cells” and click OK.
    14-freeze-the-button-movement

Add Macro Buttons Using ActiveX Controls

  1. First, go to the “Developer” tab and click on the “Insert” icon under the “Control” group on the ribbon.
    15-developer-tab-insert-icon
  2. After that, select the first button option from the “ActiveX Controls” menu and draw a button on the worksheet.
    16-activex-controls-button
  3. Now, to create and insert the macro to the button, click on the “View Code” icon to launch the VBA editor.
    17-view-code
  4. Now, select the” CommandButton1” on the subprocedure and choose the “Click” option from the drop-down list on the right side of the editor.
    18-vba-editor

Contents

  • 1 How do I create a button in Excel?
  • 2 How do I make Excel buttons look good?
  • 3 How do I insert a button icon in Excel?
  • 4 What are Excel buttons?
  • 5 How do I create a button in Excel 2019?
  • 6 How do I add a button in Excel without the Developer tab?
  • 7 How do I create a Save button in Excel?
  • 8 How do I create a button shape in Excel?
  • 9 How do you customize a button in Excel?
  • 10 How do I create a button in Excel 2007?
  • 11 How do I create a command button to copy and paste data in Excel?
  • 12 What is the difference between form control and ActiveX control in Excel?
  • 13 How do you move a button in Excel?
  • 14 Where is the Save button found in Excel?
  • 15 What is the difference of Save button and save as button on Microsoft Excel?
  • 16 How do I add a email button in Excel?
  • 17 Where is Object button in Excel?

How do I create a button in Excel?

Click “Insert” in Controls Group

  1. Click “Insert” in Controls Group.
  2. Click “Insert” in the Controls group on the Developer tab in Excel.
  3. Select “Toggle Button”
  4. Select “Toggle Button” from the list of ActiveX Controls.
  5. Click where Button Should Appear.

How do I make Excel buttons look good?

Make sure the button is selected and then click the Format tab that will have appeared. From here, you can adjust almost any visual aspect of the button. However, the easiest thing to do is to click the More button for the Shape Styles section and choose a style from there. Now you should have a nicer looking button.

How do I insert a button icon in Excel?

Inserting icons
To insert an icon, click the Insert tab and then select Icons. The Insert Icons menu will appear. You can scroll through a wide range of subjects, including people, technology, commerce, the arts, and more. Once you find an icon you like, select it and then click Insert.

What are Excel buttons?

Buttons in excel are single-click commands which are inserted to perform certain task for us, buttons are used in macros and it can be inserted by enabling developer’s tab, in the insert form controls in excel.

How do I create a button in Excel 2019?

Add a button (Form control)

  1. On the Developer tab, in the Controls group, click Insert, and then under Form Controls, click Button .
  2. Click the worksheet location where you want the upper-left corner of the button to appear.
  3. Assign a macro to the button, and then click OK.

How do I add a button in Excel without the Developer tab?

Here are the steps to create the macro button:

  1. Draw a shape on the sheet (Insert tab > Shapes drop-down > Rectangle shape).
  2. Add text to the shape (Right-click > Edit Text | or double-click in the shape).
  3. Assign the macro (Right-click the border of the shape > Assign Macro…)
  4. Select the macro from the list.
  5. Press OK.

How do I create a Save button in Excel?

Adding “Save” Button in Excel
If you want to add a VBA save as button in Excel, you can do so using the “Developer” tab in the ribbon menu. Make sure you have enabled it by customizing the ribbon, and then click the “Insert” button; under “ActiveX Controls,” click the word “Button.”

How do I create a button shape in Excel?

Create Shapes for Macro Buttons

  1. On the Ribbon’s Insert tab, click Shapes, then click the shape that you want to use as a button.
  2. Then, click on the worksheet, where you want the top left corner of the button to appear.
  3. A shape will appear, in the default size.

How do you customize a button in Excel?

Steps

  1. Follow FILE > Options > Customize Ribbon path to access customizing options.
  2. Select a category from Choose commands from drop-down to see available commands.
  3. Click New Tab button to your custom tab.
  4. Select the commands you want to add from left-side list and click Add>> button to move them under new.

How do I create a button in Excel 2007?

MS Excel 2007: Creating a button

  1. When the Excel Options window appears, click on the Popular option on the left.
  2. Select the Developer tab from the toolbar at the top of the screen.
  3. Position your cursor in the spreadsheet and hold down the left mouse button and drag until your button is the correct size.

How do I create a command button to copy and paste data in Excel?

Create a Command Button to copy and paste data with VBA code

  1. Insert a Command Button by clicking Developer > Insert > Command Button (ActiveX Control).
  2. Draw a Command Button in your worksheet and right click it.

What is the difference between form control and ActiveX control in Excel?

As Hans Passant said, Form controls are built in to Excel whereas ActiveX controls are loaded separately. Generally you’ll use Forms controls, they’re simpler. ActiveX controls allow for more flexible design and should be used when the job just can’t be done with a basic Forms control.

How do you move a button in Excel?

Control click or right-click on the button, then click anywhere else in the workbook, the button should be like the following image, then put your cursor on it to check if you can move it. 4.

Where is the Save button found in Excel?

The first method is Save as button in left bar under File tab (Microsoft Excel 2010/2013) or Office Button (Microsoft Excel 2007). You can click this Save as button to save workbooks as other file types. The second methods is Save & Send button in left bar. In the middle section, you can select the Save & Send options.

What is the difference of Save button and save as button on Microsoft Excel?

The main difference between Save and Save As is that Save helps to update the lastly preserved file with the latest content while Save As helps to store a new file or to store an existing file to a new location with the same name or a different name.

How do I add a email button in Excel?

How to send email if button is clicked in Excel?

  1. Insert a Command Button in your worksheet by clicking Developer > Insert > Command Button (ActiveX Control).
  2. Right-click the inserted Command Button, then click View Code from the right-clicking menu as below screenshot show.

Where is Object button in Excel?

Click inside the cell of the spreadsheet where you want to insert the object. On the Insert tab, in the Text group, click Object. On the Create New tab, select the type of object you want to insert from the list presented.

When we mention buttons in Excel, anyone who is not a consistent user will wonder what that means. Yes, Microsoft Excel does have Macros buttons which are the most advanced level of Excel. These buttons are commands initiated by a single click. It is easy to add buttons to excel. A user can simplify and save the time that they will take to navigate between different cells looking for specific information. In short, the buttons are inserted to perform specific tasks for us. The three different types of buttons you can place in a worksheet include;

  • Shapes
  • Form Control Buttons

This article shows how to add a button in Excel and how to assign Macros to them. With those buttons, navigating through your spreadsheet won’t be a nightmare anymore.

Method 1: Using shapes to create Macro buttons to open a particular sheet

You can create a macros button by using shapes. You can easily create a rounded rectangle; add a hyperlink to it for your worksheet. Here is what you can do;
1. On the main menu ribbon, click on the Insert tab.

2. Go to Shapes, click the drop-down arrow, and select the Rounded Rectangle icon.

3. Draw a rounded rectangle on your worksheet.

5. Format the shape by typing text into it-Right-click on the form and select edit text. Or double-click the shape.

6. To Hyperlink the shape, right-click on it and select Hyperlink from the menu. Right-clicking will display an Insert Hyperlink dialogue box.

  • Under the ‘Link to’ section, select ‘Place in This Document.
  • Under the ‘Type the cell reference’ section, type in the destination cell address.
  • Under the ‘Or select a place in this document box, click to choose the particular sheet name. Click the OK button when done.

When you click the rounded rectangle, it will skip to the specified cell of a specified sheet.

7. To assign the macro, right-click on the table and select Assign Macro. Under the ‘Macros in’ drop-down arrow, select ‘This Workbook’. Here, select the macro from the list of macros in This Workbook.

8. Press OK. When you point your mouse on this shape, it will turn to the hand pointer cursor, and clicking the form will run the macro. Remember to set your shape not to resize with cell changes by right-clicking on it and selecting ‘Size and Properties.’

Method 2: Using Developers Form Control Buttons to create buttons in Excel

1. On the main ribbon, click on the Developer tab.

2. Go to the Insert button and click the drop-down arrow.

3. Under Form Control, select the first option called button. Draw a button on your worksheet

4. Next, in the Assign Macro dialogue box, type or select a name for the macro.

5. Click OK when done. You can click on this button to run the macro.

Using ActiveX Controls

 Since running a macro in Excel can prove tedious, you can assign a macro to a button to run it faster. In this case, you can follow these steps to add a button in Excel using ActiveX controls easily.

1. Right-click anywhere on the Home ribbon and select Customize the Ribbon option from the pop-up menu. 

2. Once the Customize the Ribbon window is open, go to the Main Tabs section and select the Developer option.

3. Click OK. However, if you already have the Developer Tab added to your ribbon, then proceed as follows. 

4. Go to the Developer Tab and click on Insert.

5. Next, click on your preferred button under the ActiveX Controls.

You can now drag it anywhere in the Excel worksheet to create a button. 

6. Right-click on the newly created button and select the View Code option from the drop-down menu. 

7. You can now type this code, which sets the value of cell A6 to Hello:

Range(“A6”).Value = “Hello”

8. If you want to test setting the cell value, ensure the Design Mode option is deselected. You can also click on the button, and the Hello text will be displayed on your screen.

You can further use VBA codes to assign a different task for various operations such as double-clicking, single-clicking, right-clicking, and many more. When you right-click on the button, you can also select the Format Control option. However, the only downside is that the size of the buttons changes every time you make changes on the worksheet or share it.

Adding Macros To Quick Access Toolbar

Adding macros to Quick Access Toolbar also allows you to create buttons in Excel and use them on any sheet in your present workbook. To do this, follow these steps:

1. Right-click on the arrow below the ribbon of the Excel workbook.

2. When the Customize Quick Access Toolbar screen opens, navigate and select More Commands at the bottom.

3. Select Macros in the Choose commands from the section. You can click on the down-facing arrow in the Popular Commands box.

4. Select the HighlightMaxValue option and click on the Add button.

5. You can now click on Modify to customize the symbol of the macro.

6. Select your preferred symbol from the provided list and hit the OK button.

7. Finish by clicking OK to add a button to your Excel workbook. If you want to run the HighlightMaxValue macro, simply click on the icon.

Conclusion

When working with adding buttons to Excel, it is best to keep it easy and straightforward. The above methods portray these as the steps are short and easy to follow. They are not only easy to set up, but they also give you different options for formatting.

Кнопка в Microsoft Excel

Excel — это сложный процессор электронных таблиц, который пользователи назначают для решения широкого круга задач. Одна из этих задач — создать на листе кнопку, нажатие на которую запускает определенный процесс. Эта проблема полностью решается с помощью набора инструментов Excel. Посмотрим, как можно создать такой объект в этой программе.

Процедура создания

Как правило, такая кнопка предназначена для использования в качестве ссылки, инструмента для запуска процесса, макроса и т.д. Хотя в некоторых случаях этот объект может быть только геометрической фигурой и, помимо визуальных целей, может не иметь никакого смысла. Однако такой вариант встречается довольно редко.

Способ 1: автофигура

Во-первых, давайте посмотрим, как создать кнопку из набора встроенных фигур Excel.

Выбор формы в Microsoft Excel

Перемещение границ в Microsoft Excel

Добавление гиперссылки в Microsoft Excel

  1. Переходим к вкладке «Вставка». Щелкните значок Фигуры, расположенный на ленте в панели инструментов «Иллюстрации». Отображается список всех типов фигур. Выберите форму, которая, по вашему мнению, лучше всего подходит для роли кнопки. Например, такой формой может быть прямоугольник со скругленными углами.
  2. После щелчка переместите его в ту область листа (ячейки), где мы хотим, чтобы была кнопка, и переместите края внутрь, чтобы объект принял нужный нам размер.
  3. Теперь вам нужно добавить конкретное действие. Пусть это будет переход на другой лист при нажатии кнопки. Для этого щелкните по нему правой кнопкой мыши. В контекстном меню, которое активируется позже, выберите пункт «Гиперссылка».
  4. В открывшемся окне создания гиперссылки перейдите на вкладку «Вставить в документ». Выбираем лист, который считаем нужным, и нажимаем кнопку «ОК».

Окно создания гиперссылки в Microsoft Excel

Теперь, когда вы нажимаете на созданный нами объект, он переместится на выбранный лист документа.

Кнопка создана в Microsoft Excel

Способ 2: стороннее изображение

Вы также можете использовать сторонний дизайн в качестве кнопки.

Перейти к выбору изображения в Microsoft Excel

Окно выбора изображения Microsoft Excel

Выровнять размеры кнопок в Microsoft Excel

Перейти к назначению макроса в Microsoft Excel

  1. Находим стороннее изображение, например, в Интернете и скачиваем на свой компьютер.
  2. Мы открываем документ Excel, в который хотим вставить объект. Перейдите на вкладку «Вставка» и щелкните значок «Изображение», расположенный на ленте в панели инструментов «Иллюстрации».
  3. Откроется окно выбора изображения. Мы используем его, чтобы перейти в каталог на жестком диске, где расположен образ, который должен действовать как кнопка. Выберите его название и нажмите кнопку «Вставить» внизу окна.
  4. Затем изображение добавляется на плоскость рабочего листа. Как и в предыдущем случае, его можно сжать, перетащив края. Переместите дизайн в ту область, где мы хотим разместить объект.
  5. Позже вы можете прикрепить гиперссылку к кнопке, как это было показано в предыдущем методе, или вы можете добавить макрос. В последнем случае щелкните изображение правой кнопкой мыши. В появившемся контекстном меню выберите пункт «Назначить макрос…».
  6. Откроется окно управления макросами. В нем нужно выбрать макрос, который вы хотите применить при нажатии кнопки. Этот макрос уже должен быть записан в книгу. Выделите его название и нажмите кнопку «ОК».

Выбор макроса в Microsoft Excel

Теперь, когда вы нажимаете на объект, запускается выбранный макрос.

Кнопка на листе в Microsoft Excel

Способ 3: элемент ActiveX

Наиболее функциональная кнопка может быть создана, если элемент управления ActiveX используется в качестве основной основы. Посмотрим, как это делается на практике.

Перейдите в раздел Параметры в Microsoft Excel

Включить режим разработчика в Microsoft Excel

Создание кнопки с помощью элементов управления ActiveX в Microsoft Excel

Элемент управления ActiveX в Microsoft Excel

Щелкните элемент управления ActiveX в Microsoft Excel

  1. Для работы с элементами ActiveX в первую очередь необходимо активировать вкладку разработчика. Дело в том, что по умолчанию он отключен. Поэтому, если вы еще не включили его, перейдите на вкладку «Файл», затем перейдите в раздел «Параметры».
  2. В активированном окне опций перейдите в раздел «Настроить ленту». В правой части окна установите флажок «Разработчик», если он отсутствует. Затем нажмите кнопку «ОК» внизу окна. Вкладка разработчика теперь будет активирована в вашей версии Excel.
  3. После этого перейдем во вкладку «Разработчик». Нажмите кнопку «Вставить», расположенную на ленте в панели инструментов «Элементы управления». В группе «Элементы управления ActiveX» щелкните первый элемент, похожий на кнопку.
  4. Затем щелкните в любом месте листа, которое мы сочтем необходимым. Сразу после этого предмет появится там. Как и в предыдущих способах, корректируем его положение и размер.
  5. Щелкните получившийся элемент двойным щелчком левой кнопки мыши.
  6. Откроется окно редактора макросов. Здесь можно зарегистрировать любые макросы, которые вы хотите запускать при щелчке по этому объекту. Например, вы можете написать макрос для преобразования текстового выражения в числовой формат, как показано ниже. После того, как макрос был записан, нажмите кнопку закрытия в правом верхнем углу окна.

Редактор макросов в Microsoft Excel

Теперь макрос будет прикреплен к объекту.

Способ 4: элементы управления формы

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

Создание элемента управления формы в Microsoft Excel

Объект на листе в Microsoft Excel

  1. Перейдите на вкладку «Разработчик» и нажмите знакомую кнопку «Вставить», расположенную на ленте в группе «Элементы управления». Список открывается. В нем вам нужно выбрать первый элемент, который помещен в группу «Элементы управления формой». Этот объект визуально выглядит так же, как аналогичный элемент ActiveX, о котором мы говорили выше.
  2. Объект появляется на листе. Исправьте размер и положение, как мы это делали не раз.
  3. Затем назначьте макрос созданному объекту, как показано в методе 2, или назначьте гиперссылку, как описано в методе 1.

Кнопка на листе в Microsoft Excel

Как видите, создать функциональную кнопку в Excel не так сложно, как может показаться начинающему пользователю. Также эту процедуру можно провести четырьмя разными способами на ваше усмотрение.

Как сделать кнопку в Excel? Войдите в раздел «Разработчик», откройте меню «Вставить», выберите изображение и назначьте макрос, гиперссылку, переход на другой лист или иную функцию. Ниже подробно рассмотрим все способы создания клавиш в Эксель, а также приведем функции, которые им можно присвоить.

Как создать кнопку: базовые варианты

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

  1. Жмите по ленте правой клавишей мышки (ПКМ).
  2. В появившемся меню кликните на пункт «Настройка ленты …».
  3. В окне «Настроить ленту» поставьте флажок возле «Разработчик».
  4. Кликните «ОК».

После того, как сделана подготовительная работа, можно вставить кнопку в Excel. Для этого можно использовать один из рассмотренных ниже способов.

Через ActiveX

Основной способ, как создать кнопку в Excel — сделать это через ActiveX. Следуйте такому алгоритму:

  1. Войдите в раздел «Разработчик».
  2. Жмите на кнопку «Вставить».
  3. В появившемся меню выберите интересующий элемент ActiveX.
  4. Нарисуйте его нужного размера.

Через элемент управления

Второй вариант — создание кнопки в Excel через элемент управления. Алгоритм действий такой:

  1. Перейдите в «Разработчик».
  2. Откройте панель «Вставить».
  3.  Выберите интересующий рисунок в разделе «Элемент управления формы».
  4. Нарисуйте нужный элемент.
  5. Назначьте макрос или другую функцию.

Через раздел фигур

Следующий способ, как добавить кнопку в Excel на лист — сделать это с помощью раздела «Фигуры». Алгоритм действий такой:

  1. Перейдите в раздел «Вставка».
  2. Войдите в меню «Иллюстрации», где выберите оптимальную фигуру.
  3. Нарисуйте изображение необходимой формы и размера.
  4. Кликните ПКМ по готовой фигуре и измените оформление.

В качестве рисунка

Вставка кнопки Excel доступна также в виде рисунка. Для достижения результата пройдите такие шаги:

  1. Перейдите во вкладку «Вставка».
  2. Кликните в категорию «Иллюстрации».
  3. Выберите «Рисунок».
  4. Определитесь с типом клавиши, который предлагается программой.

Какие кнопки можно создать

В Excel возможно добавление кнопки двух видов:

  1. Command Button — срабатывает путем нажатия, запускает определенное действие (указывается индивидуально). Является наиболее востребованным вариантом и может играть роль ссылки на страницу, таблицу, ячейку и т. д.
  2. Toggle Button — играет роль переключателя / выключателя. Может нести определенные сведения и скрывать в себе два параметра — Faste и True. Это соответствует двум состояниям — нажато и отжато.

Также перед тем как поставить кнопку в Эксель, нужно определиться с ее назначением. От этого напрямую зависят дальнейшие шаги. Рассмотрим разные варианты.

Макрос

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

Если вы решили сделать клавишу с помощью ActiveX, алгоритм будет таким:

  • Войдите в «Режим конструктора».

  • Кликните дважды по ней.
  • В режиме Visual Basic между двумя строками впишите команду, необходимую для вызова макроса., к примеру, Call Макрос1.

  • Установите назначение для остальных графических объектов, если они есть.

Зная, как назначить кнопку в Excel, вы легко справитесь с задачей. Но можно сделать еще проще — жмите на рисунок ПКМ и в списке внизу перейдите в раздел «Назначить макрос». Здесь уже задайте интересующую команду.

Переход на другой лист / ячейку / документ

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

  • Подготовьте клавишу по схеме, которая рассмотрена выше.
  • Выделите ее.
  • На вкладке «Вставка» отыщите «Гиперссылка».

  • Выберите подходящий вариант. Это может быть файл, веб-страница, e-mail, новый документ или другое место.
  • Укажите путь.

Рассмотренный метод не требует указания макросов и предоставляет расширенные возможности. При желании можно также использовать и макросы.

Существует и другой способ, как сделать кнопку в Excel для перехода к определенному листу. Алгоритм такой:

  1. Создайте рисунок по рассмотренной выше схеме.
  2. В окне «Назначить макрос» введите имя макроса, а после жмите на клавишу входа в диалоговое окно Microsoft Visual Basic.
  3. Вставьте код для перехода к другому листу — ThisWorkbook.Sheets(«Sheet1»).Activate. Здесь вместо Sheet1 укажите путь к листу с учетом запроса.
  4. Сохраните код и закройте окно.

Сортировка таблиц

При желании можно сделать клавишу для сортировки таблиц Excel. Алгоритм действий такой:

  • Создайте текстовую таблицу.
  • Вместо заголовков добавьте автофигуры, которые в дальнейшем будут играть роль клавиш-ссылок на столбцах таблицы.

  • Войдите в Visual Basic режим, где в папке Modules вставьте модуль Module1.
  • Кликните ПКМ по папке и жмите на Insert Module.
  • Сделайте двойной клик по Module1 и введите код.
  • Назначьте каждой фигуре индивидуальный макрос.

После выполнения этих шагов достаточно нажать по заголовку, чтобы таблица сортировала данные в отношении определенного столбца.

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

Отличного Вам дня!

This tutorial is a detailed guide to creating interesting actionable buttons in Excel. If you want to learn to automate your Excel sheets by adding interactive buttons to your records, then this tutorial is made for you. Once we have created macros, we will learn to edit them in Excel.

Wait, what? You don’t know what macros are? Go ahead and read this article -> How to Record Macros in Excel?

If you’re still reading, I assume that you know what macros are and how to record them. So, let’s get started with this fun guide to creating some actionable buttons that you can use in your sheets to automate your data.

The best part is, you don’t have to be a VBA guru to create actionable buttons in Excel because this tutorial requires you to have zero knowledge in VBA to get started! Here are the steps to create actionable buttons without VBA in Excel.

Steps to create interactive buttons in Excel

This button will allow you to store the values from a user form to the database in the backend, refresh the table, or do whatever you want them to do for you. Isn’t it cool? You can get the experience of turning your spreadsheets into professional software.

To get started, let’s take an example of a user data entry form with a non-interactive button illustration below it.

buttons in Excel

You need to create two worksheets, one with the user form and the other with the database table where the user form data will be stored.

buttons in Excel

We will first record a macro in which we manually execute the action that is going to be done by the Submit button.

Here’s how to create interactive buttons in MS Excel 2016.

Here are the steps to create buttons in MS Excel 2019. Please follow the steps carefully. I have used a simpler example to help you understand better.

random details 1
  • Fill in random user details in the form.
  • Go to the View tab.
  • Pull down on Macros.
  • Click Record Macro.
  • Give your macro a name.
submit macro
  • Click OK. Now that the macro recording has started, follow these steps carefully without clicking anywhere else.
  • After clicking OK, copy the random user data you just filled in.
  • Go to the Database worksheet.
  • Right-click on the first empty cell in the table.
  • Pull right on Paste Special.
  • Choose the Transpose icon.
  • Don’t click anywhere yet!
transpose

Now that the first user entry is pasted horizontally, follow these final steps before ending the recording.

  • Go to the Home tab.
  • In the Cells group, pull down on Insert.
  • Click on Insert sheet rows.
  • Lastly, click on the first empty cell of the table again.
  • Don’t click anywhere yet!
new row
  • Navigate back to the user form sheet.
  • Delete the random entries you created from the cells.
  • Click on an empty cell in the sheet.
  • Stop recording the macro from the ribbon below, use your custom shortcut key, or choose Stop Recording from Macros in the View tab.

Woohoo, our macro is ready to be assigned to the Submit button!

assign macro
assign submit
  • Right-click on the submit button.
  • Click Assign macro.
  • Choose This workbook from the Macros in option below.
  • Choose the macro you just created.
  • Click OK.

Yay! It’s time to test your interactive button!

  • Clear all entries from the database sheet.
  • Fill in random user data in the form and click on the Submit button.
  • Navigate to the database sheet to check if the data is stored correctly.
  • Check with multiple user data to ensure everything working smoothly.

Conclusion

This tutorial was a detailed guide to creating interactive and actionable buttons in Excel without VBA. With this tutorial, you can easily automate any dataset and transform your works into smart and manageable records. Stay tuned at QuickExcel to learn more about smart Excel automation!

Содержание

  1. Add a check box or option button (Form controls)
  2. Formatting a control
  3. Deleting a control
  4. Need more help?
  5. Add a Button and Assign a Macro in Excel
  6. Excel Buttons
  7. Run a Macro From a Button
  8. The Excel Developer Tab
  9. Add a Macro Button
  10. Assigning a Macro to a Button
  11. Assign Existing Macro to a Button
  12. Edit an Existing Macro Before Assigning to a Button
  13. Record a Macro and Assign to Button
  14. Write VBA Procedure and Assign to Button
  15. Change Macro Assigned to Button
  16. How to Adjust Button Properties in Excel
  17. Move or Resize Excel Button
  18. Rename Button
  19. Format Button
  20. Assign a Macro to a Shape
  21. Assign a Macro to a Hyperlink
  22. Создание кнопки в Microsoft Excel
  23. Процедура создания
  24. Способ 1: автофигура
  25. Способ 2: стороннее изображение
  26. Способ 3: элемент ActiveX
  27. Способ 4: элементы управления формы

Add a check box or option button (Form controls)

You can insert form controls such as check boxes or option buttons to make data entry easier. Check boxes work well for forms with multiple options. Option buttons are better when your user has just one choice.

To add either a check box or an option button, you’ll need the Developer tab on your Ribbon.

Notes: To enable the Developer tab, follow these instructions:

In Excel 2010 and subsequent versions, click File > Options > Customize Ribbon , select the Developer check box, and click OK.

In Excel 2007, click the Microsoft Office button > Excel Options > Popular > Show Developer tab in the Ribbon.

To add a check box, click the Developer tab, click Insert, and under Form Controls, click .

To add an option button, click the Developer tab, click Insert, and under Form Controls, click .

Click in the cell where you want to add the check box or option button control.

Tip: You can only add one checkbox or option button at a time. To speed things up, after you add your first control, right-click it and select Copy > Paste.

To edit or remove the default text for a control, click the control, and then update the text as needed.

Tip: If you can’t see all of the text, click and drag one of the control handles until you can read it all. The size of the control and its distance from the text can’t be edited.

Formatting a control

After you insert a check box or option button, you might want to make sure that it works the way you want it to. For example, you might want to customize the appearance or properties.

Note: The size of the option button inside the control and its distance from its associated text cannot be adjusted.

To format a control, right-click the control, and then click Format Control.

In the Format Control dialog box, on the Control tab, you can modify any of the available options:

Checked: Displays an option button that is selected.

Unchecked: Displays an option button that is cleared.

In the Cell link box, enter a cell reference that contains the current state of the option button.

The linked cell returns the number of the selected option button in the group of options. Use the same linked cell for all options in a group. The first option button returns a 1, the second option button returns a 2, and so on. If you have two or more option groups on the same worksheet, use a different linked cell for each option group.

Use the returned number in a formula to respond to the selected option.

For example, a personnel form, with a Job type group box, contains two option buttons labeled Full-time and Part-time linked to cell C1. After a user selects one of the two options, the following formula in cell D1 evaluates to «Full-time» if the first option button is selected or «Part-time» if the second option button is selected.

If you have three or more options to evaluate in the same group of options, you can use the CHOOSE or LOOKUP functions in a similar manner.

Deleting a control

Right-click the control, and press DELETE.

Currently, you can’t use check box controls in Excel for the web. If you’re working in Excel for the web and you open a workbook that has check boxes or other controls (objects), you won’t be able to edit the workbook without removing these controls.

Important: If you see an «Edit in the browser?» or «Unsupported features» message and choose to edit the workbook in the browser anyway, all objects such as check boxes, combo boxes will be lost immediately. If this happens and you want these objects back, use Previous Versions to restore an earlier version.

If you have the Excel desktop application, click Open in Excel and add check boxes or option buttons.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

Add a Button and Assign a Macro in Excel

Excel Buttons

In Excel, Buttons are used to call Macros. This tutorial will cover how to create Excel buttons, assign Macros to them, adjust their properties, and more.

By default, Excel macros are accessible in a list via the “Macros” button on the View ribbon.

Often though, you’ll want to provide easy access to a particular macro directly on your worksheet. This can be achieved using a Button control.

A Button control looks like a Microsoft Windows button, and runs a macro when clicked. It’s a much handier way to access your most commonly used macros, and is an easy way to expose custom functionality to other users of your workbook.

Run a Macro From a Button

To run a Macro from a button in Excel, simply click the button:

The Excel Developer Tab

Buttons are accessible via the Developer Tab.

Unfortunately, Excel hides the Developer tab by default. If you don’t see the Developer Ribbon, follow these steps:

  • Click File >Options in the list on the left-hand border

  • In the Options dialog select Customize Ribbon > Customize the Ribbon > Main Tabs and add a check-mark in the box for “Developer”, and click OK.

Add a Macro Button

In Excel, select the Developer tab, then click on the “Insert” dropdown in the Controls section. There are several types of controls divided into two sections, “Form Controls” and “ActiveX Controls”.

For now, just click on the Button control under “Form Controls”. Next, move the mouse anywhere over the worksheet surface, then hold left-click and drag the mouse to draw the outline of a rectangle. When you release left-click, a new dialog will appear titled “Assign Macro”.

Assigning a Macro to a Button

Here you can assign an existing Macro to the button, record a new macro, create a new macro from scratch using VBA, or click “Cancel” and return to your button later.

Assign Existing Macro to a Button

To assign an existing Macro, you simply select the macro’s name in the list, then click OK.

Edit an Existing Macro Before Assigning to a Button

To edit a macro before assigning it to the button, select the macro’s name in the list and click the “Edit” button (the “New” button text changes to “Edit”).

Record a Macro and Assign to Button

To record a new macro and assign it to the button, click “Record…”. This brings up the Record Macro dialog, where you specify a name and click “OK”. The button will be assigned that macro. Meanwhile, Excel will remain in a recording state until you click “Stop Recording” in the “Code” section of the Developer tab.

Write VBA Procedure and Assign to Button

To write a new macro for the button, type a new name for your macro in the textbox at the top of the dialog, then click “New”. Excel will bring up the VB Editor, in which you’ll see a new empty macro procedure with the name you entered. This procedure will be stored in a new module, visible in the Project window.

Change Macro Assigned to Button

To change the Macro that’s assigned to a button, simply right-click the button and select Assign Macro:

Here you can see the assigned Macro and make any desired changes.

How to Adjust Button Properties in Excel

Move or Resize Excel Button

After you’ve placed a button, you can easily move or resize it. To perform any of these actions, right-click on the button. Then you can left-click and drag the button to your desired location or resize it.

Rename Button

With the button selected, left-click on the button text to edit.

To add multiple lines, simple press the ENTER key.

Format Button

To format other button properties, Right-Click > Format Control

Here you can adjust font sizes, and many other button properties:

Of particular note is the “Properties” tab, which changes how the button behaves as surrounding rows and columns are inserted, deleted, resized, or hidden/unhidden.

  • Move and size with cells: The button will move and resize when rows and columns are changed.
  • Move but don’t size with cells: The button will move, but not resize.
  • Don’t move or size with cells: The button will not move or resize.
  • Finally, Print Object can set the object to appear on printouts. This is unchecked by default, but can be toggled on if desired.

Assign a Macro to a Shape

Besides buttons, macros can assigned to other objects like Pictures, Textboxes, and Shapes. With a Picture or Shape, you can make a button that looks any way you like. Excel includes a wide variety of customizable Shapes including polygons, arrows, banners, and more that may be better suited to your worksheet than a regular button control.

Shapes are accessed from the Insert tab:

Select the shape you want from the Shape dropdown, draw it onto your worksheet as you would a button control, then right-click it and select “Assign Macro…” from the pop-up dialog. The options are the same as assigning a macro to a button.

Assign a Macro to a Hyperlink

Macros can also be assigned to hyperlinks by using VBA Events. Events are procedures that are triggered when certain actions are performed:

  • Open/Close/Save Workbook
  • Activate / Deactivate Worksheet
  • Cell Values Change
  • Click Hyperlink
  • and more.

Events require knowledge of VBA. To learn more about events, visit our VBA Tutorial.

Источник

Создание кнопки в Microsoft Excel

Excel является комплексным табличным процессором, перед которым пользователи ставят самые разнообразные задачи. Одной из таких задач является создание кнопки на листе, нажатие на которую запускало бы определенный процесс. Данная проблема вполне решаема с помощью инструментария Эксель. Давайте разберемся, какими способами можно создать подобный объект в этой программе.

Процедура создания

Как правило, подобная кнопка призвана выступать в качестве ссылки, инструмента для запуска процесса, макроса и т.п. Хотя в некоторых случаях, данный объект может являться просто геометрической фигурой, и кроме визуальных целей не нести никакой пользы. Данный вариант, впрочем, встречается довольно редко.

Способ 1: автофигура

Прежде всего, рассмотрим, как создать кнопку из набора встроенных фигур Excel.

    Производим перемещение во вкладку «Вставка». Щелкаем по значку «Фигуры», который размещен на ленте в блоке инструментов «Иллюстрации». Раскрывается список всевозможных фигур. Выбираем ту фигуру, которая, как вы считаете, подойдет более всего на роль кнопки. Например, такой фигурой может быть прямоугольник со сглаженными углами.

Теперь при клике по созданному нами объекту будет осуществляться перемещение на выбранный лист документа.

Способ 2: стороннее изображение

В качестве кнопки можно также использовать сторонний рисунок.

  1. Находим стороннее изображение, например, в интернете, и скачиваем его себе на компьютер.
  2. Открываем документ Excel, в котором желаем расположить объект. Переходим во вкладку «Вставка» и кликаем по значку «Рисунок», который расположен на ленте в блоке инструментов «Иллюстрации».
  3. Открывается окно выбора изображения. Переходим с помощью него в ту директорию жесткого диска, где расположен рисунок, который предназначен выполнять роль кнопки. Выделяем его наименование и жмем на кнопку «Вставить» внизу окна.
  4. После этого изображение добавляется на плоскость рабочего листа. Как и в предыдущем случае, его можно сжать, перетягивая границы. Перемещаем рисунок в ту область, где желаем, чтобы размещался объект.

Теперь при нажатии на объект будет запускаться выбранный макрос.

Способ 3: элемент ActiveX

Наиболее функциональной кнопку получится создать в том случае, если за её первооснову брать элемент ActiveX. Посмотрим, как это делается на практике.

  1. Для того чтобы иметь возможность работать с элементами ActiveX, прежде всего, нужно активировать вкладку разработчика. Дело в том, что по умолчанию она отключена. Поэтому, если вы её до сих пор ещё не включили, то переходите во вкладку «Файл», а затем перемещайтесь в раздел «Параметры».
  2. В активировавшемся окне параметров перемещаемся в раздел «Настройка ленты». В правой части окна устанавливаем галочку около пункта «Разработчик», если она отсутствует. Далее выполняем щелчок по кнопке «OK» в нижней части окна. Теперь вкладка разработчика будет активирована в вашей версии Excel.
  3. После этого перемещаемся во вкладку «Разработчик». Щелкаем по кнопке «Вставить», расположенной на ленте в блоке инструментов «Элементы управления». В группе «Элементы ActiveX» кликаем по самому первому элементу, который имеет вид кнопки.
  4. После этого кликаем по любому месту на листе, которое считаем нужным. Сразу вслед за этим там отобразится элемент. Как и в предыдущих способах корректируем его местоположение и размеры.
  5. Кликаем по получившемуся элементу двойным щелчком левой кнопки мыши.
  6. Открывается окно редактора макросов. Сюда можно записать любой макрос, который вы хотите, чтобы исполнялся при нажатии на данный объект. Например, можно записать макрос преобразования текстового выражения в числовой формат, как на изображении ниже. После того, как макрос записан, жмем на кнопку закрытия окна в его правом верхнем углу.

Теперь макрос будет привязан к объекту.

Способ 4: элементы управления формы

Следующий способ очень похож по технологии выполнения на предыдущий вариант. Он представляет собой добавление кнопки через элемент управления формы. Для использования этого метода также требуется включение режима разработчика.

  1. Переходим во вкладку «Разработчик» и кликаем по знакомой нам кнопке «Вставить», размещенной на ленте в группе «Элементы управления». Открывается список. В нем нужно выбрать первый же элемент, который размещен в группе «Элементы управления формы». Данный объект визуально выглядит точно так же, как и аналогичный элемент ActiveX, о котором мы говорили чуть выше.
  2. Объект появляется на листе. Корректируем его размеры и место расположения, как уже не раз делали ранее.
  3. После этого назначаем для созданного объекта макрос, как это было показано в Способе 2 или присваиваем гиперссылку, как было описано в Способе 1.

Как видим, в Экселе создать функциональную кнопку не так сложно, как это может показаться неопытному пользователю. К тому же данную процедуру можно выполнить с помощью четырех различных способов на свое усмотрение.

Источник

Skip to content

logo, professor, excel

buttons, button, excel, How to Use Buttons on an Excel WorksheetYou are looking for a simply way to make your Excel table look professional? Hardly known but easy to use: Buttons, for example, Check Boxes or Spin Buttons can change values.

How to easily insert buttons in Excel

Before you start using buttons, you have to display the Developer tools. Right click on any ribbon and click “Customize the Ribbon”. Make sure the box for Developer is ticked on the right hand side.

To insert a Check Box (the numbers are corresponding to the picture above):

  1. Select the Check Box under “Insert” on the Developer ribbon.
  2. Place the Check Box on your Excel sheet.
  3. Right-click on it and go to “Format Control”.
  4. The Check Box needs one cell in which it writes “TRUE” or “FALSE”, depending on if it’s checked or not.
  5. Now you can use the specified cell in your formulas. In the above example, if cell F3 is set to TRUE, the price of the car will be shown in cell E7 (see the IF formula in cell E7).

You can use “Spin Buttons” (next to the Check Box on the Insert menu) more or less the same way. You have to define a cell. By pressing on the arrow up or down the value in that cell will be modified.

Henrik Schiffner is a freelance business consultant and software developer. He lives and works in Hamburg, Germany. Besides being an Excel enthusiast he loves photography and sports.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.

.

Понравилась статья? Поделить с друзьями:
  • How to play the word game with friends
  • How to make button in excel
  • How to play any word on words with friends
  • How to make box in word
  • How to perform a test in excel