All about excel forms

Summary

More Information

The following methods show how to use list boxes, combo boxes, spin buttons, and scroll bars. The examples use the same list, cell link, and Index function.

Enable the Developer tab

To use the form controls in Excel 2010 and later versions, you have to enable the Developer tab. To do this, follow these steps:

  1. Click File, and then click Options.
    file options

  2. Click Customize Ribbon in the left pane.
    customize ribbon

  3. Select the Developer check box under Main Tabs on the right, and then click OK.

To use the forms controls in Excel 2007, you must enable the Developer tab. To do this, follow these steps:

  1. Click the Microsoft Office Button, and then click Excel Options.
    file options in excel 2007

  2. Click Popular, select the Show Developertab in the Ribbon check box, and then click OK.
    ribbon

Set up the list, the cell link, and the index

  1. In a new worksheet, type the following items in the range H1:H20:

    H1 : Roller Skates

    H2 : VCR

    H3 : Desk

    H4 : Mug

    H5 : Car

    H6 : Washing Machine

    H7 : Rocket Launcher

    H8 : Bike

    H9 : Phone

    H10: Candle

    H11: Candy

    H12: Speakers

    H13: Dress

    H14: Blanket

    H15: Dryer

    H16: Guitar

    H17: Dryer

    H18: Tool Set

    H19: VCR

    H20: Hard Disk

  2. In cell A1, type the following formula: 

    =INDEX(H1:H20,G1,0)

List box example

  1. To add a list box in Excel 2007 and later versions, click the Developer tab, click Insert in the Controls group, and then click List Box Form (Control) under Form Controls.
    form controls

    To add a list box in Excel 2003 and in earlier versions of Excel, click the List Box button on the Forms toolbar. If the Forms toolbar is not visible, point to Toolbars on the View menu, and then click Forms.

  2. Click the worksheet location where you want the upper-left corner of the list box to appear, and then drag the list box to where you want the lower-right corner of the list box to be. In this example, create a list box that covers cells B2:E10.

  3. In the Controls group, click Properties.
    contrl property

  4. In the Format Object window, type the following information, and then click OK.

    1. To specify the range for the list, type H1:H20 in the Input range box.

    2. To put a number value in cell G1 (depending on which item is selected in the list), type G1 in the Cell link box.

      Note: The INDEX() formula uses the value in G1 to return the correct list item.

    3. Under Selection type, make sure that the Single option is selected.

      Note:  The Multi and Extend options are only useful when you are using a Microsoft Visual Basic for Applications procedure to return the values of the list. Note also that the 3-D shading check box adds a three-dimensional look to the list box.

      format object

  5. The list box should display the list of items. To use the list box, click any cell so that the list box is not selected. If you click an item in the list, cell G1 is updated to a number that indicates the position of the item that is selected in the list. The INDEX formula in cell A1 uses this number to display the item’s name.

Combo box example

  1. To add a combo box in Excel 2007 and later versions, click the Developer tab, click Insert, and then click Combo Box under Form Controls.
    combobox icon

    To add a combo box in Excel 2003 and in earlier versions of Excel, click the Combo Box button on the Forms toolbar.

  2. Click the worksheet location where you want the upper-left corner of the combo box to appear, and then drag the combo box to where you want the lower-right corner of the list box to be. In this example, create a combo box that covers cells B2:E2.
    place combobox

  3. Right-click the combo box, and then click Format Control.
    format control

  4. Type the following information, and then click OK:

    1. To specify the range for the list, type H1:H20 in the Input range box.

    2. To put a number value in cell G1 (depending on which item is selected in the list), type G1 in the Cell link box.
       

      Note: The INDEX formula uses the value in G1 to return the correct list item.

    3. In the Drop down lines box, type 10. This entry determines how many items will be displayed before you have to use a scroll bar to view the other items.

      Note: The 3-D shading check box is optional. It adds a three-dimensional look to the drop-down or combo box.

      control tab

  5. The drop-down box or combo box should display the list of items. To use the drop-down box or combo box, click any cell so that the object is not selected. When you click an item in the drop-down box or combo box, cell G1 is updated to a number that indicates the position in the list of the item selected. The INDEX formula in cell A1 uses this number to display the item’s name.

Spin button example

  1. To add a spin button in Excel 2007 and later versions, click the Developer tab, click Insert, and then click Spin Button under Form Controls.
    spin button

    To add a spinner in Excel 2003 and in earlier versions of Excel, click the Spinner button on the Forms toolbar.

  2. Click the worksheet location where you want the upper-left corner of the spin button to appear, and then drag the spin button to where you want the lower-right corner of the spin button to be. In this example, create a spin button that covers cells B2: B3.

  3. Right-click the spin button, and then click Format Control.
    spin control format control

  4. Type the following information, and then click OK:

    1. In the Current value box, type 1.

      This value initializes the spin button so that the INDEX formula will point to the first item in the list.

    2. In the Minimum value box, type 1.

      This value restricts the top of the spin button to the first item in the list.

    3. In the Maximum value box, type 20.

      This number specifies the maximum number of entries in the list.

    4. In the Incremental change box, type 1.

      This value controls how much the spin button control increments the current value.

    5. To put a number value in cell G1 (depending on which item is selected in the list), type G1 in the Cell link box.
      cell link box

  5. Click any cell so that the spin button is not selected. When you click the up control or down control on the spin button, cell G1 is updated to a number that indicates the current value of the spin button plus or minus the incremental change of the spin button. This number then updates the INDEX formula in cell A1 to show the next or previous item.

    The spin button value will not change if the current value is 1 and you click the down control, or if the current value is 20 and you click the up control.

Scroll bar example

  1. To add a scroll bar in Excel 2007 and later versions, click the Developer tab, click Insert, and then click Scroll Bar under Form Controls.
    scroll bar

    To add a scroll bar in Excel 2003 and in earlier versions of Excel, click the Scroll Bar button on the Forms toolbar.

  2. Click the worksheet location where you want the upper-left corner of the scroll bar to appear, and then drag the scroll bar to where you want the lower-right corner of the scroll bar to be. In this example, create a scroll bar that covers cells B2:B6 in height and is about one-fourth of the width of the column.
    place scoll bar

  3. Right-click the scroll bar, and then click Format Control.
    scoll bar format control

  4. Type the following information, and then click OK:

    1. In the Current value box, type 1.

      This value initializes the scroll bar so that the INDEX formula will point to the first item in the list.

    2. In the Minimum value box, type 1.

      This value restricts the top of the scroll bar to the first item in the list.

    3. In the Maximum value box, type 20. This number specifies the maximum number of entries in the list.

    4. In the Incremental change box, type 1.

      This value controls how many numbers the scroll bar control increments the current value.

    5. In the Page change box, type 5. This value controls how much the current value will be incremented if you click inside the scroll bar on either side of the scroll box).

    6. To put a number value in cell G1 (depending on which item is selected in the list), type G1 in the Cell link box.
      cell link box

      Note: The 3-D shading check box is optional. It adds a three-dimensional look to the scroll bar.

  5. Click any cell so that the scroll bar is not selected. When you click the up or down control on the scroll bar, cell G1 is updated to a number that indicates the current value of the scroll bar plus or minus the incremental change of the scroll bar. This number is used in the INDEX formula in cell A1 to show the item next to or before the current item. You can also drag the scroll box to change the value or click in the scroll bar on either side of the scroll box to increment it by 5 (the Page change value). The scroll bar will not change if the current value is 1 and you click the down control, or if the current value is 20 and you click the up control.

Let’s say you own a hot sauce company. 

Having an Excel customer feedback form will tell you how tasty 😋 and spicy 🌶️ your sauce is. Beats asking people individually, any day, right?

So whether you want to survey customers, take client feedback, or collect data from employees, Excel forms can be handy.

But how do you create a form in Excel in the first place?!

In this article, you’ll learn how to create a form in Excel. 

We’ll also go over its limitations and suggest an alternative tool to create forms easily.

Make way for the hot sauce feedback with a quick Excel form!

What Are Excel Forms?

An Excel form is a data collection tool from Microsoft Excel. It’s basically a dialog box containing fields for a single record. 

In each record, you can enter up to 32 fields, and your Excel worksheet column headers become the form field names.

What are the benefits of using an Excel data entry form?

Now Excel isn’t easy. 

Its endless cells make it difficult to know where to feed what data. 

Like trying to understand what ‘mild’ means when all you know and love is spicy sauces!

This is why people use Excel forms to make quick data entries in the right fields without scrolling up and down the whole worksheet.

No more entering data into an Excel spreadsheet row after row after row after row… 

a chef kissing her fingers

An Excel data entry form lets you:

  • View more data without scrolling up and down
  • Include data validation
  • Reduce chances of human errors

Sounds quite helpful. So let’s learn how to create an Excel form.

How To Create A Form In Excel?

Before you cook up a form in Excel, you gotta do the prep work.

First, you must have your columns or fields ready. 

They’re your raw ingredients, like chili peppers or ginger, ready for your sauce.

You also have to find the ‘Form’ option.

No worries. 

We’ll help you make a table, find the ‘Form’ option, and create an Excel form using a step-by-step guide:

Step 1: Make a quick Excel table

Open an Excel spreadsheet, and you’ll start on the first sheet tab (by default).

For this form, you’re the owner of a hot sauce company.

And we’re gonna make a customer feedback form for your delicious sauce.

Here’s an example of the columns you can add to your Excel worksheet:

columns in an excel sheet

Now you have to convert your column names into a table.

Just select the column headers > click on Insert > Tables > Table.

A tiny dialog box should pop up. Make sure to tick the My table has headers checkbox.

dialog box for create table

Click on OK, and you should get an Excel table as shown in the image below.

excel table

Here, you can adjust the column width depending on the data the field may contain.

Step 2: Add data entry form option to the Excel ribbon

Take a good look at your Excel worksheet. 

Check the row of tabs and icons at the top of the Excel window (ribbon). You won’t find the option to use a data entry form in any ribbon tab.

a boy saying what

Don’t worry. It’s perfectly normal.  

You have to add the ‘form’ option to the Excel sheet ribbon. To do this:

  • Right-click on any of the existing icons you see in the ribbon or toolbar
  • Click on Customize the Ribbon
  • An Excel Options dialog box should pop up
  • Select All Commands from the drop-down list
  • Scroll down the list of commands and select Form
  • Now click on Add
customize ribbon in excel

Did it work? If yes, congratulations!

In case it didn’t allow you to add the Form command button or option, just click on New Tab > Rename > Name it ‘Form’ > click OK.

Then, click on New Group > Add

Make sure the Form option is selected when you click Add.

form option in excel

And that’s it! You have finally completed adding the Form icon to the ribbon.

To access it quickly in your workbook, click on Quick Access Toolbar in the same Excel Options dialog box you used earlier. 

Select Form under All Commands > click Add. Then, hit enter.

customize quick access toolbar in Excel

And voila!

You’ll notice the Form button or icon appear on the green area at the top of the Excel workbook in the quick access toolbar.

form button in quick access toolbar

Bonus: Make a Fillable Form in Word!

Step 3: Enter form data

Now, you can click on any cell in your table and then on the Form icon to input form data.

A dialog box should open with the field names and some button options such as New, Delete, Restore, and criteria button.

enter form data

This is a customized data entry form based on the fields in our data. 

Enter the desired data in the fields and click on the form button New

That should make the data appear in your Excel table.

Click on Close to leave the dialog box and view your data table.

Repeat the process till you have entered all the data you want.

customized data entry

Step 4: Restrict data entry based on conditions

If your hot sauce form contains certain criteria or rules for filling fields, data validation can be useful. It ensures your customers’ data conforms to a few conditions.

For example, you want the sauce feedback field to only accept short texts. So you can create a data validation rule to allow only a specific text length. 

If a customer enters feedback longer than what you want, it will not be allowed, and they will see an error.

Here’s how you can set these data entry form control conditions:

  • Select the cell or cells where you want to add a data validation rule. In this example, we have selected cells under the feedback column (D2-D5
  • Click the Data tab > Data Validation icon > select Data Validation from the drop-down list 
Restrict data entry based on conditions in excel
  • The Data Validation dialog box will appear. Under Settings, select Text length from the Allow drop-down. Then choose the text length condition under Data and the number of characters. Click OK to apply the rules 

Here we chose the condition ‘less than’ and set the feedback character limit to a maximum ‘10’.

data validation in excel

Now, when you use the data entry form to enter text in the feedback column, and if it isn’t a text under ten characters, it won’t be allowed.

You’ll be alerted with a sound and this error message. 

error in excel

But this is just an example. 

Don’t stop your customers from singing praises for your sauce! 😛

Data validation only helps ensure people don’t fill in wrong data in the fields.

I mean, what if someone enters the feedback ‘amazing’ in the name field?

Great idea for a name, but no help for your data collection efforts! 😜

Step 5: Start collecting data

You can now collect data using any of these options:

  • Ask customers to fill the form by sharing the Excel file with them. Invite them using their email address or copy and share the spreadsheet link
  • Send a copy of the form as an email attachment
  • Fill in the data yourself as the customers give you feedback 

You’ll find all these options by clicking on share on the top right corner of your sheet.

share button in excel

Note: This process is different from creating a custom form using Excel VBA (Visual Basics for Application). Excel VBA is a Microsoft Excel programming language used to automate tasks and perform other functions such as create a text box, userform, etc. 

The Excel VBA user form isn’t an ideal option since it’s even more complicated to set up.

Bonus: Use Jotform to create forms!

3 Limitations Of Creating Forms In Excel

Excel does kind of speed up the data entry process using the form functionality. 

However, it doesn’t make it fun, and that’s just one of its limitations.

Here are some more limitations that might make you want to reconsider using an Excel data entry form:

1. Formula restrictions

Excel formulas have split the world into two teams. 

One finds it convenient, and the other finds it impossible. 

Like how some people love hot sauces while others prefer something sweeter.  

But with forms, you straight-up can’t enter an Excel formula into a data form field.

You just can’t. 

Then why even use Excel?!

2. Field limit

Clearly, there’s a limit to how many fields there can be in an Excel form.

What do you do when you want more than 32 columns (fields)?

Wouldn’t it be easier to have a tool that wasn’t as complex as MS Excel and didn’t restrict fields?

3. Not the most user-friendly form

Excel can be difficult for many users because of the different functions and rules.

To create form in Excel, you must add a feature to the toolbar. 

What’s with the hide and seek, Excel?

Oh, and it’s absolutely not user-friendly for Mac users. 

Cause guess what?

The form command doesn’t even exist in the Mac version! *scoff*

Having second thoughts about Excel? Here are the top Excel alternatives

Clearly, you need a tool that can make up for all the Excel form drawbacks and do more.

Good news!  

Introducing ClickUp, one of the world’s highest-rated productivity tool used by teams in small and big companies.

Related Resources:

  • How to Create a Project Timeline in Excel
  • How to Make a Calendar in Excel
  • How to Create an Org Chart in Excel
  • How to Make a Graph in Excel
  • How to Make a KPI Dashboard in Excel
  • How to Make an Excel Database
  • How to Show Dependencies in Excel

Create Effortless Forms Using ClickUp

ClickUp is the ultimate all-in-one tool to create forms.

What you’re looking for is our Form view

And unlike Excel, we don’t hide it. Because we’re proud of it! 😎

a woman saying when we do a job, we do it right

We also want you to find it without reading a guide like you just did.

Check out these ClickUp Form tips for educators!🍎

To build a form in ClickUp, you must add a form view in three simple steps:

  • Open a List, Space, or Folder of your choice
  • Click on the + button and select Form
  • Name it and add a description

Ensure that the name is something catchy or appropriate depending on the purpose of your form. 

How’s ‘Fire cannot kill a dragon’ for a catchy hot sauce form title? 

(Warning: Only people who love their spice will get this 😎)

Now let’s build this form!

You’ll find a bunch of fields on the left panel in the form view. Drag and drop them on your form, and that’s how easy it is to add a field.

The panel doesn’t have the field you’re looking for? No worries!

Just click on the field’s title to rename it.

forms in clickup

But wait, we’re not close to done being awesome. 

Did you know you can also add your company branding in the form view? 

After you complete it, it’s time to share your form.

Spot the ‘Share’ icon on the top right of the form view. Click on it to copy the direct link for your form to share it with anyone you like. 

Or you can build the form into a page via the HTML code through the ‘embed code’ section.

share form in clickup

Bonus: Form building tips for ClickUp.

And lastly, we’re pretty sure you won’t need any other tool if you have ClickUp forms.

But if you prefer other apps like Google Forms, ClickUp can easily integrate with them too. The integration converts Google Forms responses into ClickUp tasks automatically.

What’s more?

ClickUp has so many more awesome features in store for you. 

Here’s a sneak peek at some of the many features ClickUp has to offer:

  • View tasks in a spreadsheet format with the Table view
  • Create tasks and reminders without the internet with offline mode
  • Assign a single task to multiple assignees
  • Create workflows with custom statuses
  • Set reminders, so you don’t miss out on important tasks
  • Share all your views with anyone using public sharing
  • Integrate with all your favorite tools, including Trello, Microsoft Teams, Google Drive, etc.
  • Import an Excel file into ClickUp by saving it as a CSV
  • Track task durations using the native time tracker

Excel Or ClickUp: What’s Hot? 🔥 

An Excel form is less of a form creator and more of an easy data entry application. 

It can help you avoid mistakes if data entry is part of your daily work.

However, when it comes to creating forms, Excel doesn’t seem ideal.

Instead, try ClickUp. It’s a powerful project management tool that lets you create custom forms using a simple drag and drop functionality.

If there’s anything you want to do beyond that, ClickUp has a long list of features, including Mind maps, Workload view, Notepad, priorities, and more.

So you never have to leave the platform for anything. Save your precious time, people!

Use ClickUp for free and create red-hot forms that nobody can resist!🌶️ 

Shaq tasting a hot chicken wing

Entering and managing lots of data can be a daunting task. It’s easy to get overwhelmed in all of those rows and columns of information. The solution is to use a form. A form is simply a dialog box that lets you display or enter information one record (or row) at a time. It can also make the information more visually appealing and easier to understand.

Most people who are familiar with the MS Office suite associate complex forms with Excel’s sister program Access, but you can use them in Excel as well. In fact, you can even share data between the two programs.

Adding the Form Button to the Quick Access Toolbar The Form button is not included in the ribbon, but you can add it to the Quick Access Toolbar, which, if you remember, is in the upper left hand corner of the application window.

To add the Form button, click the arrow to the right of the Quick Launch toolbar and select More Commands. This will launch the Excel Options window, which can also be accessed by clicking Options on the File tab.

In the «Choose commands from» box, select All Commands, then scroll down through the list until you find Forms. Select it and click Add. When you are finished, click OK.

Before you can use the data form function in MS Excel, you must first create a label at the top of each column for each range of information. That’s because Excel uses these labels to create fields on the form. See the illustration below for an example of a simple data form.

Entering Data Using a Data Form If you’ve ever filled out an application online, you’re familiar with a data form. In fact, when you fill out one of those applications, you are inserting information into a database program much like Excel, except you never get to see the resulting spreadsheet.

Entering data is as easy as selecting the correct field and typing. Use the Tab key to jump to the next field. When you are finished, press Enter. This automatically takes you to the next record. If you are at the end of the record list, it will create a new file. 

Use the scroll bar or the Find Prev, Find Next buttons to browse through records.

Use the Criteria button to enter a search term into any field.

Developing a Workbook

 In this section, we’re going to show you how to develop it further to fit your needs.

Format Worksheet Tabs

You can change the color of a worksheet tab by right click on it and choosing Tab Color.

You can also choose to protect the sheet from editing by right clicking on it and choosing Protect Sheet.

This will  prevent you from accidentaly changing something, or an unauthorized person from editing it.

Choose a password, then select the items you’d like to protect. Click OK when finished.

Reposition Sheets

You can easily reposition worksheets by left clicking its tab in the lower left hand portion of the workbook and dragging it to the desired position. As you drag, a black arrow becomes active between the worksheet tabs, telling you where the worksheet will be place. Release the mouse to place the worksheet.

You can also right click on a tab and click Move or Copy.

A window will open that looks like this:

You can choose to move the sheet between books, or within the same book, and position it before other sheets. You can also create a copy of the selected sheet. Click OK when finished.

Inserting, Deleting, and Renaming Worksheets

To insert a worksheet, right click on a worksheet tab and select insert. An Insert window will open. You have the option of inserting a worksheet, a chart, a workbook, and more. Since we’re just going to insert a worksheet, we’re going to select it and click OK.

To delete a worksheet, right click on it and select Delete.

To rename a worksheet, right click on it and select Rename. The name of the worksheet will be highlighted in black. Type your new name and hit enter.

Copy Worksheets

To create a copy of a worksheet, right click on its tab and select Move or Copy.

Check the Create a copy box. You can copy sheets to different workbooks easily in this way.

Printing a Workbook

Printing a workbook is not quite as easy as printing a document in Microsoft Word. Setting it up to print in a way that is visually appealing and in the order you’d like takes some setting up. The rest of this section is devoted to helping you do just that.

The tools that will help you print your document correctly can be found on the Page Layout tab, while the Print button is located in File tab (Backstage View.)

Right now, let’s focus on the technical aspects like choosing a printer and locating the print button.

Go to the File tab and click Print.

Here we can choose the number of copies we’d like to print, as well as our printer. In this example, we have Send To OneNote2007 as our printer. To select an active printer on your computer, click this button.

If you don’t have a printer installed, you can choose to add one.

When you are ready to print, click the Print button.

Set Print Titles

The Print Titles  button opens the Page Setup window.

Here you can select a print area, as well as which rows or columns to repeat. You can also elect to print Gridlines, row and column headings, or in black and white and draft quality.

Use the Page order section to select the way in which Excel will print.

Headers/Footers

You can insert a header and a footer for each worksheet in your workbook. The Header/Footer   button is located on the Insert tab.

A header is any text or information that is entered into the top margin of a page, while a footer is the text and information entered into the bottom margin of a page.

When you click the Header & Footer button, the headers and footers become active in your worksheet.

Your worksheet will look like this.   Below that is a zoom of the left and right sides of the Header and Footer Tools ribbon.

 

As you can see, a header is available for every page that will be printed. To enter a header, click it and start typing. In the example above, the header on the left is active.

You may also have noticed that the Header & Footer Tools are active. This is true any time a header or footer is selected. To switch between a header and a footer, use the Go to Header and Go to Footer buttons in the Navigation group of the Header & Footer tools.

You can use the tools in the Header & Footer Elements groups to add elements to your header or footer, such as a page number, the current date and time, a sheet name and even a picture.

Page Margins

The Page Margins   button can be found on the Page Layout tab. This allows you to set white space around the edges of your worksheets when you print them. (They don’t normally affect how you work within a worksheet, at least not in the same way that page margins affect your documents in a word processing program like MS Word.)

Clicking the button reveals a dropdown menu.

You can choose one of the predefined margin styles, or you can create your own by clicking Custom Margins at the bottom. Clicking this will open the Page Setup window.

Clicking the Print Preview button will show you an exact replica of what your worksheet will look like when printed. Click OK when you are satisfied.

Page Orientation

Page orientation refers to the long side of a page. For instance, if an ordinary 8 ½ x 11 sheet of paper is positioned vertically (that is with the shortest edge at the top and bottom), it’s orientation is said to be in Portrait View. If the piece of paper is positioned so that the longest edge is on the top and bottom, it is said to be in Landscape View.

Again, this doesn’t mean anything while you are working within a workbook, since you’re more interested in entering information. When you are printing is when this is most important. That is why the tools to change page orientation can be found on the File tab (Backstage View) in the Print tools.

In the example above, Portrait Orientation is selected. Click the button to select a landscape orientation. You can also change orientation in the Page Setup window.

The Orientation  button can also be found on the Page Layout tab.

Page Breaks

The Page Break button is located on the Page Layout tab. When you enter a page break in this way, the place in your worksheet where the page break appears will be a dark dotted line, as in the following example.

Print a Range of Pages

To print a range of pages, instead of the entire document at once, go to the Backstage View, and click Print.

Choose Print Selection, then enter the page range you’d like to print. In this case, we’re going to print pages 2 through 7.

Select a printer, then click the Print button: .

Sharing Worksheets and Workbooks

There are several ways to share data and information located in your MS Excel 2010 workbooks with other colleagues, associates, or friends.   The way you share depends on how you want to transmit the information, if the person you are sending it to has MS Excel, or if you just want to send a fixed version of a finished workbook by email. In this article, we’re going to cover the ways that you can share your MS Excel 2010 workbooks.

Using Online Collaboration

An exciting new feature for Excel 2010 is the tight integration with the Excel 2010 web app. The web app is available from Microsoft Office Live, and requires a Windows Live ID to access. 

The Excel Web App allows you to create and edit Excel files inside your web browser. This means you can access them anywhere, as long as you have an internet connection. You don’t even have to have Excel 2010 installed on your computer.

Excel 2010 is, however, tightly integrated with the web app. You can easily access and edit documents in Excel and save them directly to the web.

What’s more, the documents you create or even upload to the Excel web app are stored on SkyDrive, which is a «cloud service» provided by Microsoft. With Skydrive you can allow others access to these files for easy collaboration. You can even track changes someone else makes to your files in real time.

To save or access files in SkyDrive, go to the File tab (Backstage View) and click Save to Web. You will be asked to sign into SkyDrive with your Windows Live ID. When you do, Excel will automatically retrieve the folders and documents stored there.

 

Protecting a Workbook

Even though you may be collaborating with other individuals, you may want to protect certain formatting options and pieces of information so that they cannot be inadvertently altered.

The tools that help you accomplish this task can be found on the Review tab.

The Protect Sheet button allows you to protect only the attributes of a given sheet. It launches a window which asks you for a password and which attributes you want to lock. In this examples, users will be able to select locked and unlocked cells, format rows (but not columns) and insert rows and hyperlinks.

The Protect Workbook function allows you to lock the structure and windows of a workbook.

Change Versions of a Workbook

Excel allows you to recover previous versions of a workbook in case of emergency. To do so, go to Info on the File tab and then select Manage Versions.

You will have the option of recovering previous versions of a workbook or deleting them.

Clicking the Recover Unsaved Workbooks option asks you to locate the unsaved workbook.

Select a workbook and click Open.

A message will tell you that this is an unsaved file from a temporary location on your computer.

If you’d like to keep the file, click Save As.

Set Up a Shared Version of a Workbook

You can use MS Excel 2010 to create a workbook that several users can work in simultaneously. All these users would create the workbook together, meaning this is very different than allowing users to edit a workbook.

To create a workbook that can be shared, go to the Review tab click the Share Workbook button. 

This dialogue box shows you all users who have the workbook open at that time.   If you want other users to be able to make changes at the same time, check the box at the top, under the editing tab. You should check this box for workbook sharing, then click OK. 

Save the workbook. Go to the File Tab and save the file on a network location where other users can access and collaborate on it. 

Note: If, after the workbook is finished, you’ll want to merge all the copies together, click the Review tab and make sure track changes is enabled.

Merging Versions of the Same Workbook

Of course, when you have several users creating the same workbook, you’re going to want to see the different versions that are created. Each user should save the workbook as a unique file name, then send the versions to you.   You can then compare and merge the different versions with your own (the master version.) 

Open the workbook that you want to use to compare against other versions.

The Merge Workbooks button is not available in the ribbon by default, but you can add it easily with the new customizable ribbon tools.

To do so, go to the File tab (Backstage View) and click Options. Select Customize Ribbon and in the Choose commands from box, select Commands Not in the Ribbon. Scroll down until you find the Compare and Merge Workbooks button and select it. This will activate the Add>> button between the two panes. We’re going to put the button in the Review tab near all of the other collaboration tools. You will have to create a new group in order to add the button, but that’s as easy and clicking the New Group button. As soon as you’ve created a new group, click the Add>> button. The button should now be available. Click OK.

Now let’s go to the Review tab and make sure it is available.

And there it is, on the extreme right of the above example.

Note: You can only merge a shared workbook with copies that were made from the same shared notebook. Also, all users must save a copy of the shared workbook with a file name that is different from the original workbook. However, all copies of the shared workbook should be located in the same folder.

Click the Compare and Merge Workbooks button and select the Workbooks you want to Merge. Click OK when finished.

Adding, Editing, and Deleting Comments

You can attach a comment to any cell by selecting the cell, then going to the Review tab and clicking the New Comment button: . When a comment is made, a red wedge appears in the corner of the cell it’s attached to.

There are a few ways you can see the comment. The easiest is to simply hover the mouse pointer over it.

Alternatively, you can navigate to the Review tab and click the Show/Hide Comment  button or the Show All Comments   button. Use the Previous  and Next  buttons to navigate through the comments in a document.

If you select a cell that already has a comment in it, the New Comment button will change to the Edit Comment  button . Click this to be able to edit a comment.

There are two ways to delete a comment. The first, and easiest, is to right click the cell that contains the comment you want to delete, then selecting Delete Comment.

The other way is to select the cell with a comment, going to the Review tab and clicking the Delete Comment  button.

Creating and Sharing Workbook Templates

A template is a worksheet or workbook that already had your preferred formatting such as font, font size, colors, etc. You can create your own templates in MS Excel 2010 easily and rather quickly. This part of the article will teach you how.

Creating a Template

Whenever you start a new workbook in MS Excel 2010, it uses the default template, which is simply a blank workbook with no formatting. The name of this default template is Book.xlt. 

If you use various formatted worksheets regularly, you can create worksheet templates to make the process easier. The default worksheet template that MS Excel 2010 provides is named Sheet.xlt.

To create a template:

  • Create a worksheet or workbook with the formatting that you want to be in the template.
  • To save a formatted workbook as a template, go to the File tab and click Save As. The Save As window will open, asking you where you want to save the file and what you want to name it. Click on the Save As Type box and select Excel Template or Macro Enabled Excel Template. Click save and it will be stored as a template. 

  • To save a formatted worksheet as a template, create a template with just one worksheet. Format the worksheet as you want it for the template, then go tothe File tab, and select Template in the Save As Type box.   
  • Select the folder that you want the template to be stored in. 

  

Have you tried Microsoft Forms yet?

It’s a great new tool from Microsoft that allows you to quickly and easily create surveys, quizzes and polls.

There is a wide variety of potential uses for these. You could use them to get customer feedback, collect reviews and testimonials or even use them as data entry forms.

I’m using these using these forms in my courses to get student feedback and reviews so I can improve my teaching. I also suggested them to a friend who was looking for a simple data entry solution.

Let’s take a look!

Sign Up For Microsoft Forms

If you’re signed up with Office 365, then you already have Microsoft Forms and it can either be accessed from OneDrive, SharePoint, Excel Online or the Forms website.

If you don’t have an Office account, then you can still sign up to use forms for free here https://forms.office.com/ by creating a Microsoft account.

Creating a New Form or Quiz

There are a couple different ways to create a form or quiz with Microsoft Forms.

Creating a Form in OneDrive

You can create forms inside OneDrive personal or business. Navigate to the folder where you want to store your form results ➜ click on New ➜ select Forms for Excel.

You will then be asked to name the workbook associated with your form. This workbook will be saved in your chosen folder and will be where all the form submissions will be saved.

Creating a Form in SharePoint

The same thing can be done to create a form if you have an Office 365 business account with SharePoint online.  Navigate to the folder where you want to store your form results ➜ click on New ➜ select Forms for Excel.

This also prompts you for a new workbook name where your form submissions will be saved.

Creating a Form in Excel Online

If you’re working with Excel Online, you can also create forms. Go to the Insert tab ➜ click on the Forms button ➜ select New Form from the menu.

This will create a form that’s linked to the current workbook.

Creating a Form from the Website

After you sign into https://forms.office.com/ you should be taken to the home page where you can create new forms and quizzes. If you don’t land on the home page, you can always get there from any screen using the button in the top left corner of the screen that’s labelled Forms.

From the home screen, click on either New Form or New Quiz.

The Different Types of Questions

Microsoft Forms currently has two types of forms. There are Forms and Quizzes. They both allow you to create the same type of questions. The only difference between them is you can assign point values and correct answers to quiz questions in order to calculate a quiz score.

All the questions can be accessed by clicking on the Add new button. This will show the list of available questions choices, but note that some are hidden in a menu accessible by clicking on the Ellipses.

Types of Questions

There are 7 types of questions available. Each has different options.

  • The Choice option allows you to define a list of possible answers for the user to select one or more answers from.
  • The Text option allows you to create long or short answer text questions.
  • The Rating option allows you to create questions with a star or number rating between 2 and 10.
  • The Date option allows the user to select a date from a calendar to answer the question.
  • The Ranking questions allows a user to drag and drop items to answer questions like order of preference.
  • The Likert option allows you to create “agree/disagree” scale type questions.
  • The Net Promoter Score option allows you to create questions like “How likely are you to recommend [brand X] to a friend or colleague?” that utilize a net promoter style grading.

Tip: Some question types like the Choice and Ranking options allow you to copy and paste from a range in Excel or a line separated text file. This is handy if you have a long list of choices to add.

Each type of question has a different menu. For example, the above picture shows the available options for the Choice style questions.

  1. You can copy, delete or move the question from the menu in the top right of the question.
  2. You can add the actual question along with a subtitle (the subtitle option is found in the Ellipses menu).
  3. Forms has some built in AI capability to suggest answers for some types of questions. You can select individual items from its suggestions or add them all.
  4. For the multiple choices you can add or delete choices. You can mark the correct answer (for quizzes) and add comments to the choices.
  5. You can add more choice options.
  6. For quizzes, you can assign a point value for the purpose of calculating a quiz score.
  7. You can allow multiple answers and set the question to require an answer in order to submit the form.
  8. Further options are available in the Ellipses menu.

Form Sections

Sections in forms or quizzes allow you to break up the form into parts.

If you have a lot of questions in your form and don’t use sections, then the user would see all the questions on one page. Adding sections means you can break this up into multiple pages and the user will only see the next section of questions after completing the current section.

This can help with form submission rates, as seeing long lists of questions can discourage a user from answering all the questions and submitting the form.

You can add sections by clicking on Add new ➜ Ellipses menu ➜ Section.

Previewing a Form

When you’ve done creating your form, you can easily preview it and see exactly what a user will see.

Click on the Preview button in the top right to view and test the form. Careful though, as submitting the form in preview mode will still add the response to your results and you will have to manually delete the response to remove it from your results.

You’ll be able to preview what the form looks like on both mobile and desktop by using the buttons at the top right while in preview mode.

Form and Quiz Settings

Each form has some important settings that can be found in the Ellipses menu.

  1. For quizzes, you can choose to show the results to respondents automatically after submission.
  2. Forms and quizzes can either be public or private to an organization. When shared within an organization, you can chose to record the respondent’s name and limit users to one submission.
  3. There are options to open or close the form to accepting responses. You can set a start and end date for accepting responses. You can shuffle the order in which questions appear. You can add a custom thank you message that appears after a user submits the form.
  4. You can set notification options to send email notifications to each user or to yourself when a new response is received.

Form Branching

The above is an example of a form that uses branching.

Branching is one of the most useful features in Forms, but it’s unfortunately hidden inside an Ellipses menu. This will allow you to have different questions appear next based on how the user has answered a previous question.

To create a conditional form, click on the Ellipses found in the top right ➜ then select Branching.

This example asks the user if they’ve used Microsoft Forms before and gives two options, either Yes or No. If the user selects yes, then they are asked to rate the product out of 5 stars. If the user answers no, then they are asked why not. This way users are not shown questions that are not relevant to them.

Viewing Form Results

At some point, you’re going to want to take a look at the answers that have been submitted by people using your form. This can be done in the Responses tab of any form where you can see a summarized version of the results.

  1. You can view the details of each result individually.
  2. You can view all the results in the associated Excel file.
  3. You can share the results by creating a summary link. Click on the Ellipses ➜ choose Create a summary link.

In fact, I created a summary link to the above example for which can be viewed here.

Form Themes

There’s not much you can do in order to change the look and feel of your forms, but you can change the colour or background image.

Go to the Theme menu in the top right. Here you can select from a couple preset themes or if you click on the plus icon, you can select a custom colour or background image.

Sharing Your Forms

How do are you going to use your new form?

The whole point of creating a form is to collect information from users, so after creating a form you’re going to need to share it with your user audience! This can all be done from the Share menu in the top right.

  1. You can choose to make the form available to anyone with the link or only people inside your organization.
  2. You can copy this link and send it to anyone you want to complete the form.
  3. Sharing the form can be done via link, QR code, embedded HTML form code (see example of embedded form above), or by email.
  4. You can share a copy of your form as a template via a link so others can modify it for their own use.
  5. You can collaborate on form creation within an organization or with external users with an Office account.
  6. You a link to collaborate on editing the form can be copied and shared with anyone you want to give access to edit the form.

Conclusions

If you need to collect information from different users, then Microsoft Forms might be the tool for you.

With forms, you can quickly and easily create questionnaires that you can share both internally or externally from your work.

These forms will automatically collect and store the responses inside an Excel workbook so they can be easily viewed and analyzed later.

It’s another great tool in the Office suite that works well with Excel and is one you’re definitely going to want to explore using.

About the Author

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

Содержание

  • Применение инструментов заполнения
    • Способ 1: встроенный объект для ввода данных Excel
    • Способ 2: создание пользовательской формы
  • Вопросы и ответы

Форма в Microsoft Excel

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

Применение инструментов заполнения

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

Теперь давайте рассмотрим, как пользоваться этими двумя видами инструментов.

Способ 1: встроенный объект для ввода данных Excel

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

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

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

    В поле «Выбрать команды из» устанавливаем значение «Команды не на ленте». Далее из списка команд, расположенного в алфавитном порядке, находим и выделяем позицию «Форма…». Затем жмем на кнопку «Добавить».

  4. Добавление инструмента форма на панель быстрого доступа в Microsoft Excel

  5. После этого нужный нам инструмент отобразится в правой части окна. Жмем на кнопку «OK».
  6. Инструмент форма добавлен на панель быстрого доступа в Microsoft Excel

  7. Теперь данный инструмент располагается в окне Excel на панели быстрого доступа, и мы им можем воспользоваться. Он будет присутствовать при открытии любой книги данным экземпляром Excel.
  8. Инструмент форма отображается на панеле быстрого доступа в Microsoft Excel

  9. Теперь, чтобы инструмент понял, что именно ему нужно заполнять, следует оформить шапку таблицы и записать любое значение в ней. Пусть табличный массив у нас будет состоять из четырех столбцов, которые имеют названия «Наименование товара», «Количество», «Цена» и «Сумма». Вводим данные названия в произвольный горизонтальный диапазон листа.
  10. Шапка таблицы в Microsoft Excel

  11. Также, чтобы программа поняла, с каким именно диапазонам ей нужно будет работать, следует ввести любое значение в первую строку табличного массива.
  12. первое значение в таблице в Microsoft Excel

  13. После этого выделяем любую ячейку заготовки таблицы и щелкаем на панели быстрого доступа по значку «Форма…», который мы ранее активировали.
  14. Запуск формы в Microsoft Excel

  15. Итак, открывается окно указанного инструмента. Как видим, данный объект имеет поля, которые соответствуют названиям столбцов нашего табличного массива. При этом первое поле уже заполнено значением, так как мы его ввели вручную на листе.
  16. Форма открыта в Microsoft Excel

  17. Вводим значения, которые считаем нужными и в остальные поля, после чего жмем на кнопку «Добавить».
  18. Ввод значений в форму в Microsoft Excel

  19. После этого, как видим, в первую строку таблицы были автоматически перенесены введенные значения, а в форме произошел переход к следующему блоку полей, который соответствуют второй строке табличного массива.
  20. Значения перенесы в таблицу в Microsoft Excel

    Lumpics.ru

  21. Заполняем окно инструмента теми значениями, которые хотим видеть во второй строке табличной области, и снова щелкаем по кнопке «Добавить».
  22. Добавление второй строки в таблицу через форму в Microsoft Excel

  23. Как видим, значения второй строчки тоже были добавлены, причем нам даже не пришлось переставлять курсор в самой таблице.
  24. Вторая строка заполнена в таблице в Microsoft Excel

  25. Таким образом, заполняем табличный массив всеми значениями, которые хотим в неё ввести.
  26. Все значения в таблицу введены в Microsoft Excel

  27. Кроме того, при желании, можно производить навигацию по ранее введенным значениям с помощью кнопок «Назад» и «Далее» или вертикальной полосы прокрутки.
  28. Навигация по форме в Microsoft Excel

  29. При необходимости можно откорректировать любое значение в табличном массиве, изменив его в форме. Чтобы изменения отобразились на листе, после внесения их в соответствующий блок инструмента, жмем на кнопку «Добавить».
  30. Корректировка данных в форме в Microsoft Excel

  31. Как видим, изменение сразу произошло и в табличной области.
  32. Изменение произведено в таблице в Microsoft Excel

  33. Если нам нужно удалить, какую-то строчку, то через кнопки навигации или полосу прокрутки переходим к соответствующему ей блоку полей в форме. После этого щелкаем по кнопке «Удалить» в окошке инструмента.
  34. Удаление строки через форму в Microsoft Excel

  35. Открывается диалоговое окно предупреждения, в котором сообщается, что строка будет удалена. Если вы уверены в своих действиях, то жмите на кнопку «OK».
  36. Подтверждение удаления строки в Microsoft Excel

  37. Как видим, строчка была извлечена из табличного диапазона. После того, как заполнение и редактирование закончено, можно выходить из окна инструмента, нажав на кнопку «Закрыть».
  38. Закрытие формы в Microsoft Excel

  39. После этого для предания табличному массиву более наглядного визуального вида можно произвести форматирование.

Таблица отформатированв в Microsoft Excel

Способ 2: создание пользовательской формы

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

  1. Как и в предыдущем способе, прежде всего, нужно составить шапку будущей таблицы на листе. Она будет состоять из пяти ячеек с именами: «№ п/п», «Наименование товара», «Количество», «Цена», «Сумма».
  2. Шапка таблицы создана в Microsoft Excel

  3. Далее нужно из нашего табличного массива сделать так называемую «умную» таблицу, с возможностью автоматического добавления строчек при заполнении соседних диапазонов или ячеек данными. Для этого выделяем шапку и, находясь во вкладке «Главная», жмем на кнопку «Форматировать как таблицу» в блоке инструментов «Стили». После этого открывается список доступных вариантов стилей. На функционал выбор одного из них никак не повлияет, поэтому выбираем просто тот вариант, который считаем более подходящим.
  4. Создание умной таблицы в Microsoft Excel

  5. Затем открывается небольшое окошко форматирования таблицы. В нем указан диапазон, который мы ранее выделили, то есть, диапазон шапки. Как правило, в данном поле заполнено все верно. Но нам следует установить галочку около параметра «Таблица с заголовками». После этого жмем на кнопку «OK».
  6. Окошко форматирования таблицы в Microsoft Excel

  7. Итак, наш диапазон отформатирован, как «умная» таблица, свидетельством чему является даже изменение визуального отображения. Как видим, помимо прочего, около каждого названия заголовка столбцов появились значки фильтрации. Их следует отключить. Для этого выделяем любую ячейку «умной» таблицы и переходим во вкладку «Данные». Там на ленте в блоке инструментов «Сортировка и фильтр» щелкаем по значку «Фильтр».
    Отключение фильтра через вкладку Данные в Microsoft Excel

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

  8. Отключение фильтра через вкладку Главная в Microsoft Excel

  9. Как видим, после этого действия значки фильтрации исчезли из шапки таблицы, как это и требовалось.
  10. Фильтр снят в Microsoft Excel

  11. Затем нам следует создать саму форму ввода данных. Она тоже будет представлять собой своего рода табличный массив, состоящий из двух столбцов. Наименования строк данного объекта будут соответствовать именам столбцов основной таблицы. Исключение составляют столбцы «№ п/п» и «Сумма». Они будут отсутствовать. Нумерация первого из них будет происходить при помощи макроса, а расчет значений во втором будет производиться путем применения формулы умножения количества на цену.

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

  12. Форма ввода данных на листе в Microsoft Excel

  13. После этого создаем ещё одну небольшую таблицу. Она будет состоять из одного столбца и в ней разместится список товаров, которые мы будем выводить во вторую колонку основной таблицы. Для наглядности ячейку с заголовком данного перечня («Список товаров») можно залить цветом.
  14. Таблица со списком товаров в Microsoft Excel

  15. Затем выделяем первую пустую ячейку объекта ввода значений. Переходим во вкладку «Данные». Щелкаем по значку «Проверка данных», который размещен на ленте в блоке инструментов «Работа с данными».
  16. Переход к проверке данных в Microsoft Excel

  17. Запускается окно проверки вводимых данных. Кликаем по полю «Тип данных», в котором по умолчанию установлен параметр «Любое значение».
  18. Окно проверки вводимых значений в Microsoft Excel

  19. Из раскрывшихся вариантов выбираем позицию «Список».
  20. Выбор списка в окне проверки вводимых значений в Microsoft Excel

  21. Как видим, после этого окно проверки вводимых значений несколько изменило свою конфигурацию. Появилось дополнительное поле «Источник». Щелкаем по пиктограмме справа от него левой клавишей мыши.
  22. Переход к выбору источника в окне проверки вводимых значений в Microsoft Excel

  23. Затем окно проверки вводимых значений сворачивается. Выделяем курсором с зажатой левой клавишей мыши перечень данных, которые размещены на листе в дополнительной табличной области «Список товаров». После этого опять жмем на пиктограмму справа от поля, в котором появился адрес выделенного диапазона.
  24. Адрес диапазона внесен в поле в Microsoft Excel

  25. Происходит возврат к окошку проверки вводимых значений. Как видим, координаты выделенного диапазона в нем уже отображены в поле «Источник». Кликаем по кнопке «OK» внизу окна.
  26. Закрытие окна проверки вводимых значений в Microsoft Excel

  27. Теперь справа от выделенной пустой ячейки объекта ввода данных появилась пиктограмма в виде треугольника. При клике на неё открывается выпадающий список, состоящий из названий, которые подтягиваются из табличного массива «Список товаров». Произвольные данные в указанную ячейку теперь внести невозможно, а только можно выбрать из представленного списка нужную позицию. Выбираем пункт в выпадающем списке.
  28. Список со значениями в Microsoft Excel

  29. Как видим, выбранная позиция тут же отобразилась в поле «Наименование товара».
  30. Выбранная позиция отобразилась в ячейке в Microsoft Excel

  31. Далее нам нужно будет присвоить имена тем трем ячейкам формы ввода, куда мы будем вводить данные. Выделяем первую ячейку, где уже установлено в нашем случае наименование «Картофель». Далее переходим в поле наименования диапазонов. Оно расположено в левой части окна Excel на том же уровне, что и строка формул. Вводим туда произвольное название. Это может быть любое наименование на латинице, в котором нет пробелов, но лучше все-таки использовать названия близкие к решаемым данным элементом задачам. Поэтому первую ячейку, в которой содержится название товара, назовем «Name». Пишем данное наименование в поле и жмем на клавишу Enter на клавиатуре.
  32. Наименование первой ячейки в Microsoft Excel

  33. Точно таким же образом присваиваем ячейке, в которую будем вводить количество товара, имя «Volum».
  34. Наименование второй ячейки в Microsoft Excel

  35. А ячейке с ценой – «Price».
  36. Наименование третьей ячейки в Microsoft Excel

  37. После этого точно таким же образом даем название всему диапазону из вышеуказанных трех ячеек. Прежде всего, выделим, а потом дадим ему наименование в специальном поле. Пусть это будет имя «Diapason».
  38. присвоение наименования диапазону в Microsoft Excel

  39. После последнего действия обязательно сохраняем документ, чтобы названия, которые мы присвоили, смог воспринимать макрос, созданный нами в дальнейшем. Для сохранения переходим во вкладку «Файл» и кликаем по пункту «Сохранить как…».
  40. Сохранение книги в Microsoft Excel

  41. В открывшемся окне сохранения в поле «Тип файлов» выбираем значение «Книга Excel с поддержкой макросов (.xlsm)». Далее жмем на кнопку «Сохранить».
  42. Окно сохранения файла в Microsoft Excel

  43. Затем вам следует активировать работу макросов в своей версии Excel и включить вкладку «Разработчик», если вы это до сих пор не сделали. Дело в том, что обе эти функции по умолчанию в программе отключены, и их активацию нужно выполнять принудительно в окне параметров Excel.
  44. После того, как вы сделали это, переходим во вкладку «Разработчик». Кликаем по большому значку «Visual Basic», который расположен на ленте в блоке инструментов «Код».
  45. Переход в редактор макросов в Microsoft Excel

  46. Последнее действие приводит к тому, что запускается редактор макросов VBA. В области «Project», которая расположена в верхней левой части окна, выделяем имя того листа, где располагаются наши таблицы. В данном случае это «Лист 1».
  47. Редактор макросов в Microsoft Excel

  48. После этого переходим к левой нижней области окна под названием «Properties». Тут расположены настройки выделенного листа. В поле «(Name)» следует заменить кириллическое наименование («Лист1») на название, написанное на латинице. Название можно дать любое, которое вам будет удобнее, главное, чтобы в нем были исключительно символы латиницы или цифры и отсутствовали другие знаки или пробелы. Именно с этим именем будет работать макрос. Пусть в нашем случае данным названием будет «Producty», хотя вы можете выбрать и любое другое, соответствующее условиям, которые были описаны выше.

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

    Как видим, после этого автоматически изменится и наименование Листа 1 в области «Project», на то, которое мы только что задали в настройках.

  49. Изменение наименования листа в редакторе макросов в Microsoft Excel

  50. Затем переходим в центральную область окна. Именно тут нам нужно будет записать сам код макроса. Если поле редактора кода белого цвета в указанной области не отображается, как в нашем случае, то жмем на функциональную клавишу F7 и оно появится.
  51. Поле в редкторе макросов отобразилось в Microsoft Excel

  52. Теперь для конкретно нашего примера нужно записать в поле следующий код:


    Sub DataEntryForm()
    Dim nextRow As Long
    nextRow = Producty.Cells(Producty.Rows.Count, 2).End(xlUp).Offset(1, 0).Row
    With Producty
    If .Range("A2").Value = "" And .Range("B2").Value = "" Then
    nextRow = nextRow - 1
    End If
    Producty.Range("Name").Copy
    .Cells(nextRow, 2).PasteSpecial Paste:=xlPasteValues
    .Cells(nextRow, 3).Value = Producty.Range("Volum").Value
    .Cells(nextRow, 4).Value = Producty.Range("Price").Value
    .Cells(nextRow, 5).Value = Producty.Range("Volum").Value * Producty.Range("Price").Value
    .Range("A2").Formula = "=IF(ISBLANK(B2), """", COUNTA($B$2:B2))"
    If nextRow > 2 Then
    Range("A2").Select
    Selection.AutoFill Destination:=Range("A2:A" & nextRow)
    Range("A2:A" & nextRow).Select
    End If
    .Range("Diapason").ClearContents
    End With
    End Sub

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

    Итак, первая строка:

    Sub DataEntryForm()

    «DataEntryForm» — это название самого макроса. Вы можете оставить его как есть, а можете заменить на любое другое, которое соответствует общим правилам создания наименований макросов (отсутствие пробелов, использование только букв латинского алфавита и т.д.). Изменение наименования ни на что не повлияет.

    Везде, где встречается в коде слово «Producty» вы должны его заменить на то наименование, которое ранее присвоили для своего листа в поле «(Name)» области «Properties» редактора макросов. Естественно, это нужно делать только в том случае, если вы назвали лист по-другому.

    Наименование для листа в Microsoft Excel

    Теперь рассмотрим такую строку:

    nextRow = Producty.Cells(Producty.Rows.Count, 2).End(xlUp).Offset(1, 0).Row

    Цифра «2» в данной строчке означает второй столбец листа. Именно в этом столбце находится колонка «Наименование товара». По ней мы будем считать количество рядов. Поэтому, если в вашем случае аналогичный столбец имеет другой порядок по счету, то нужно ввести соответствующее число. Значение «End(xlUp).Offset(1, 0).Row» в любом случае оставляем без изменений.

    Второй столбец таблицы в Microsoft Excel

    Далее рассмотрим строку

    If .Range("A2").Value = "" And .Range("B2").Value = "" Then

    «A2» — это координаты первой ячейки, в которой будет выводиться нумерация строк. «B2» — это координаты первой ячейки, по которой будет производиться вывод данных («Наименование товара»). Если они у вас отличаются, то введите вместо этих координат свои данные.

    Две первые ячейки таблицы с данными в Microsoft Excel

    Переходим к строке

    Producty.Range("Name").Copy

    В ней параметр «Name» означат имя, которое мы присвоили полю «Наименование товара» в форме ввода.

    Имя поля наименования товара в форме ввода в Microsoft Excel

    В строках


    .Cells(nextRow, 2).PasteSpecial Paste:=xlPasteValues
    .Cells(nextRow, 3).Value = Producty.Range("Volum").Value
    .Cells(nextRow, 4).Value = Producty.Range("Price").Value
    .Cells(nextRow, 5).Value = Producty.Range("Volum").Value * Producty.Range("Price").Value

    наименования «Volum» и «Price» означают названия, которые мы присвоили полям «Количество» и «Цена» в той же форме ввода.

    Наименование полей количество и цена в Microsoft Excel

    В этих же строках, которые мы указали выше, цифры «2», «3», «4», «5» означают номера столбцов на листе Excel, соответствующих колонкам «Наименование товара», «Количество», «Цена» и «Сумма». Поэтому, если в вашем случае таблица сдвинута, то нужно указать соответствующие номера столбцов. Если столбцов больше, то по аналогии нужно добавить её строки в код, если меньше – то убрать лишние.

    Колонки в таблице в Microsoft Excel

    В строке производится умножение количества товара на его цену:

    .Cells(nextRow, 5).Value = Producty.Range("Volum").Value * Producty.Range("Price").Value

    Результат, как видим из синтаксиса записи, будет выводиться в пятый столбец листа Excel.

    Колонка для вывода суммы в Microsoft Excel

    В этом выражении выполняется автоматическая нумерация строк:


    If nextRow > 2 Then
    Range("A2").Select
    Selection.AutoFill Destination:=Range("A2:A" & nextRow)
    Range("A2:A" & nextRow).Select
    End If

    Все значения «A2» означают адрес первой ячейки, где будет производиться нумерация, а координаты « — адрес всего столбца с нумерацией. Проверьте, где именно будет выводиться нумерация в вашей таблице и измените данные координаты в коде, если это необходимо.

    Столбец с нумерацией в Microsoft Excel

    В строке производится очистка диапазона формы ввода данных после того, как информация из неё была перенесена в таблицу:

    .Range("Diapason").ClearContents

    Не трудно догадаться, что («Diapason») означает наименование того диапазона, который мы ранее присвоили полям для ввода данных. Если вы дали им другое наименование, то в этой строке должно быть вставлено именно оно.

    Наименование полей для ввода данных в Microsoft Excel

    Дальнейшая часть кода универсальна и во всех случаях будет вноситься без изменений.

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

  53. Код в редакторе макросов в Microsoft Excel

  54. После этого возвращаемся на лист Excel. Теперь нам следует разместить кнопку, которая будет активировать созданный макрос. Для этого переходим во вкладку «Разработчик». В блоке настроек «Элементы управления» на ленте кликаем по кнопке «Вставить». Открывается перечень инструментов. В группе инструментов «Элементы управления формы» выбираем самый первый – «Кнопка».
  55. Выбор элемента управления в Microsoft Excel

  56. Затем с зажатой левой клавишей мыши обводим курсором область, где хотим разместить кнопку запуска макроса, который будет производить перенос данных из формы в таблицу.
  57. Указание границ кнопки в Microsoft Excel

  58. После того, как область обведена, отпускаем клавишу мыши. Затем автоматически запускается окно назначения макроса объекту. Если в вашей книге применяется несколько макросов, то выбираем из списка название того, который мы выше создавали. У нас он называется «DataEntryForm». Но в данном случае макрос один, поэтому просто выбираем его и жмем на кнопку «OK» внизу окна.
  59. Окно назначения макроса объекту в Microsoft Excel

  60. После этого можно переименовать кнопку, как вы захотите, просто выделив её текущее название.
    Переименовывание кнопки в Microsoft Excel

    В нашем случае, например, логично будет дать ей имя «Добавить». Переименовываем и кликаем мышкой по любой свободной ячейке листа.

  61. Кнопка переименована в Microsoft Excel

  62. Итак, наша форма полностью готова. Проверим, как она работает. Вводим в её поля необходимые значения и жмем на кнопку «Добавить».
  63. Ввод данных в форму в Microsoft Excel

  64. Как видим, значения перемещены в таблицу, строке автоматически присвоен номер, сумма посчитана, поля формы очищены.
  65. Значения первой строки внесены в таблицу в Microsoft Excel

  66. Повторно заполняем форму и жмем на кнопку «Добавить».
  67. Повторный ввод данных в форму в Microsoft Excel

  68. Как видим, и вторая строка также добавлена в табличный массив. Это означает, что инструмент работает.

Вторая строка добавлена в таблицу в Microsoft Excel

Читайте также:
Как создать макрос в Excel
Как создать кнопку в Excel

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

Понравилась статья? Поделить с друзьями:
  • All about excel charts
  • All 50 states word search
  • All 4 letter word combinations
  • Alignment of tables in word
  • Aligning text in word tables