Monday, 5 December 2016

Protecting Workbook's Structure and Window



Protecting the Structure and Windows of a Workbook

You can lock the structure of a workbook to prevents users from adding or deleting worksheets or from displaying hidden worksheets in that workbook. You can also prevent users from changing the size or position of worksheet windows. Note that workbook structure and window protection applies to the entire workbook.

To prevent a user from accidentally or deliberately changing, moving, or deleting important data, you can protect certain worksheet or workbook elements, with or without a password.

NOTE: a. Workbook and worksheet element protection should not be confused with workbook-level password security. Element protection cannot protect a workbook from users who have malicious intent.
b. If the workbook is already shared and you want to assign a password to protect the sharing, you must first un-share the workbook.

Protect worksheet or workbook elements

When you protect a worksheet, all cells on the worksheet are locked by default, and users cannot make any changes to a locked cell. For instance, they cannot insert, modify, delete, or format data in a locked cell. You can, however, specify which elements users will be allowed to change when you protect the worksheet.

Steps to Protect Worksheet Elements

  1. Select the worksheet that you want to protect.
  2. To unlock any cells or ranges that you want other users to be able to change:
    1. Select each cell or range that you want to unlock.
    2. Click on the Home tab, in the Cells group, click Format, and then click Format Cells.
    3. On the Protection tab, clear the Locked check box, and then click OK.
  3. To hide any formulas that you don't want to be visible, do the following:
    1. In the worksheet, select the cells that contain the formulas that you want to hide.
    2. Click on the Home tab, in the Cells group, click Format, and then click Format Cells.
    3. On the Protection tab, select the Hidden check box, and then click OK.
  4. Now to protect the worksheet proper; click on the Review tab, in the Changes group, click Protect Sheet.
  5. In the 'Allow all users of this worksheet to' list, select the elements that you want users to be able to change.
  6. In the 'Password to unprotect sheet' box, type a password for the sheet, click Ok.
  7. Retype the password to confirm it and click Ok.

Protect workbook elements

  1. Click on the Review tab, in the Changes group, click Protect Workbook.
  2. Then click Protect structure and window.
  3. Under 'Protect workbook for', do any of the following:
    1. To protect the structure of a workbook, select the Structure check box.
    2. To keep workbook windows in the same size and position each time the workbook is opened, select the Windows check box.
  4. Note that STRUCTURE prevents unauthorized users from; viewing worksheets that you have hidden, deleting, hiding, or changing the names of worksheets, inserting new worksheets or chart sheets, moving or copying worksheets to another workbook. In PivotTable reports; prevents them from displaying the source data for a cell in the data area, or displaying page field pages on separate worksheets. For SCENARIOS; it prevents them from creating a scenario summary report or recording new macros. The WINDOWS option prevents unauthorized users from changing the size and position of the windows for the workbook when the workbook is opened, moving, resizing, or closing the windows. But Users will be able to hide and unhide windows.
  5. Workbook elements

  6. To prevent other users from removing workbook protection, in the Password (optional) box, type a password, click Ok, and then retype the password to confirm it.

Monday, 19 September 2016

Connecting to Access Data from Excel



Connect to Access Data from Excel

To bring refreshable Access data into Excel, you can create a connection, to the Access database and retrieve all of the data from a table or query. The main benefit of connecting to Access data is that you can periodically analyse this data in Excel without repeatedly copying or exporting the data from Access. After you connect to the data, you can also automatically refresh (or update) your Excel workbooks from the original Access database whenever the database is updated with new information. For example, you may want to update an Excel summary budget report that you distribute every month so that it contains the current month's data.

  1. From Excel window, click the cell where you want to put the data from the Access database.
  2. Click on the Data tab, in the Get External Data group, click From Access.
  3. In the Look in list, locate and double-click the Access database that you want to import.
  4. In the Select Table dialog box, click the table or query that you want to import, and then click Ok.
  5. In the Import Data dialog box, do the following:
    1. Under Select how you want to view this data, do one of the following:
      1. To view the data as a table, select Table.
      2. To view the data as a PivotTable report, select PivotTable report.
      3. To view the data as a PivotChart and PivotTable report, select PivotChart and PivotTable report.
    2. Under Where do you want to put the data? Do one of the following:
      1. To return the data to the location that you selected, click Existing worksheet.
      2. To return the data to the upper-left corner of the new worksheet, click New worksheet.
  6. Click Ok.

 

Copy Access Data into Excel

From Microsoft Access, you can copy data from a datasheet view and then paste the data into an Microsoft Excel worksheet. Additionally, you can take the following steps to copy data from Microsoft Access to Microsoft Excel:

  1. Start Access, and then open the table, query, or form that contains the records that you want to copy.
  2. Click on the Home tab, click View, and then click Datasheet View.
  3. Select the records that you want to copy. If you want to select specific columns, drag across adjacent column headings.
  4. On the Home tab, in the Clipboard group, click Copy.
  5. Start Excel, and then open the worksheet that you want to paste the data into.
  6. Click in the upper-left corner of the worksheet area where you want the first field name to appear.
  7. To ensure that the copied records do not replace existing records, make sure that the worksheet has no data below or to the right of the cell that you click.
  8. Click on the Home tab, in the Clipboard group, click Paste.

Friday, 29 July 2016

Practical Export of Data Between Access and Excel



Operation to Export Data Between Access and Excel

In my previous post I showed the several ways to exchange data between Microsoft Access and Microsoft Excel. whether to bring data into Excel from Access, to bring data into Access from Excel; you can take the following steps to accomplish it.

  1. If you are working in Microsoft Access and want to export data to Microsoft Excel, open the source database.
  2. In the Navigation Pane, select the object that contains the data that you want to export. (It can be a table, a query, or a form).
  3. Review the source data to ensure that it does not contain any error indicators or error values. (If there are any errors, you must resolve them before you export the data to Excel. Otherwise, errors can occur during the export operation, and null values might be inserted into fields).
  4. If the source object is a table or a query, decide whether you want to export the data with or without its formatting.
  5. Choose the destination workbook and file format.
  6. During the export operation, Access prompts you to specify the name of the destination workbook. The workbook is then created if it does not exist. But if it exists, it is overwritten if the data, including the formatting is exported, otherwise; if the data, but not the formatting is exported, the workbook is not overwritten, instead a new worksheet is added to the workbook, and is given the name of the object from which the data is being exported.
  7. If the destination Excel workbook is open, close it before you continue.
  8. Export the Data

  9. In the source database, if you want to export only a portion of a table, query, or form, open the object and select the records you want.

  10. On the External Data tab, in the Export group, click Excel.
  11. In the Export - Excel Spreadsheet dialog box, accept the suggested name for the Excel workbook or enter another name.
  12. In the File Format box, select the file format that you want.
  13. If you are exporting a table or a query, and you want to export formatted data, select 'Export data with formatting and layout'.
  14. To view the destination Excel workbook after the export operation is complete, select the 'Open the destination file after the export operation is complete' check box.
  15. If the source object is open, and if you selected one or more records in the view before starting the export operation, you can select Export only the selected records. However, if you want to export all of the records displayed in the view, leave this check box cleared.
  16. View that dialog box below.

  17. Click Ok.

If the export operation fails due to an error, Access displays a message that describes the cause of the error. Otherwise, Access exports the data to the destination workbook in Excel. Access then displays a dialog box in which you can create a specification that uses the details from the export operation.

 

 

Save the Export Specification

  1. Click Yes if you want to save the details of the export operation for future use. This helps you repeat the same export operation in the future without having to go through the entire steps in the wizard each time.
  2. In the Save as box, type a name for the export specification.
  3. If you want to perform the operation at fixed intervals (such as weekly or monthly), select the Create Outlook Task check box.
  4. Click Save Export.
  5. If Outlook is installed, Access starts it immediately. This creates a Microsoft Office Outlook 2007 task that lets you run the specification by clicking a button.

  6. In Outlook, review and modify the task settings (such as Due date and Reminder).
  7. To make the task recur, click Recurrence. This dialog box below shows the task scheduler with some typical settings.
  8. Click Save and Close.

Run the Saved Task

  1. In the Outlook Navigation Pane, click Tasks, and then double-click the task that you want to run.
  2. On the Task tab, in the Microsoft Office Access group, click Run Import.
  3. In Excel, open the destination workbook, and then verify that all of the data were copied into the correct cells.

Tuesday, 26 July 2016

Exchange Data Between Excel and Access



How to Exchange Data Between Microsoft Excel and Access

There are several ways to exchange data between Microsoft Office Access and Microsoft Office Excel. To bring data into Excel from Access, you can copy data from an Access datasheet and paste it into an Excel worksheet, connect to an Access database from an Excel worksheet, or export Access data into an Excel worksheet.

To bring data into Access from Excel, you can copy data from an Excel worksheet and paste it into an Access datasheet, import an Excel worksheet into an Access table, or link to an Excel worksheet from an Access table.

The word IMPORT has two different meanings between Excel and Access. In Excel, the word import means to make a permanent connection to data that can be refreshed. In Access, the word import means to bring data into Access once, but without a data connection. You CANNOT save an Excel workbook as an Access database. Neither Excel nor Access provides functionality to create an Access database from Excel data.

Export Access Data to Excel

You may want to work with Access data in an Excel workbook in order to take advantage of the data analysis and charting features, the flexibility in data arrangement and layout, or the many functions that are not available in Access. You can copy data from a Microsoft Office Access 2007 database into a worksheet by exporting a database object to a Microsoft Office Excel 2007 workbook. You do this by using the Export Wizard in Office Access 2007.

By using the Export Wizard in Access, you can export an Access database object, such as a table, query, or form, or selected records in a view into an Excel worksheet. When you perform an export operation, you can save the details for future use, and even schedule the export operation to run

Scenarios for Exporting Access Data to Excel

The following are common situations for exporting data from Access to Excel:

  1. Your department or workgroup uses both Access and Excel to work with data. You store the data in Access databases, but you use Excel to analyze the data and to distribute the results of your analysis. Your team currently exports data to Excel when they need to, but if you would like to make this process more efficient, you might need to export date between the two office applications.
  2. Another scenario may be that you are a long-time user of Access, but your manager prefers to view reports in Excel. At regular intervals, you do the work of copying the data into Excel, but you would like to automate this process to save yourself time, so you would need to export data.
    Note
    1. To export data from Access to Excel, you must be working in Access. Excel does not provide any mechanism for importing data from an Access database. Again, you cannot save an Access database or table as an Excel workbook by using the Save As command of Access. You can only use the Save As command of Access to save an Access object in the current database as another Access database object.
    2. You can export a table, query, or form. You can also export selected records in a view.
    3. You cannot export macros, modules, or reports to Excel. When you export a form or datasheet that contains subforms or subdatasheets, only the main form or datasheet is exported. You must repeat the export operation for each subform and subdatasheet that you want to view in Excel.
    4. You can only export one database object in a single export operation. However, you can merge the data in multiple worksheets in Excel after completing the individual export operations.

 

Friday, 24 June 2016

How Microsoft Excel Fills in Series of Numbers, Dates, etc.



/* Google Analytic Tracking Code*/ /* End of Google Analytic Tracking Code*/

How to Fill in Series of Numbers, Dates, or other built-in Series Items in Microsoft Excel

In Microsoft Excel, you can Use the fill handle to quickly fill cells in a range with a series of numbers or dates or with a built-in series for days, weekdays, months, or years. The following steps will enable fill such series into Excel cell:

  1. Type in the starting value for the series in the first cell.
  2. Type a value in the next cell to establish a pattern.
    • For instance, if you want the series 1, 2, 3, 4, 5..., type 1 and 2 in the first two cells. If you want the series 2, 4, 6, 8..., type 2 and 4. If you want the series 2, 2, 2, 2..., you can leave the second cell blank.
  3. Select the cells that contain the both starting values you have just typed.
  4. Point the mouse to the lower-right corner of the selected cell(s) and drag the fill handle across the range that you want to fill.
  5. To fill in increasing order, drag downwards or to the right. To fill in decreasing order, drag upwards or to the left.
    • You can also specify the type of series by using the right mouse button to drag the fill handle over the range and then clicking the appropriate command on the shortcut menu. For instance, if the starting value is a date like JAN-2002, click Fill Months in order to have FEB-2002, MAR-2002, and so on; or click Fill Years in order to have JAN-2003, JAN-2004, and so on.
    • If the selection contains numbers, you can control the type of series that you want to create. For instance, click Fill Series in order to have serial numbering in ascending order, or click Formatting Only in order to copy only the format of the selected cell(s).

Other examples of data that Microsoft Excel can automatically fill are shown in the table below: When you fill a series, the selections are extended as shown in the following table. Items separated by commas are in placed in individual adjacent cells.

Initial selection Extended series
1, 2, 3 4, 5, 6,...
9:00 10:00, 11:00, 12:00,...
Mon Tue, Wed, Thu,...>
Monday Tuesday, Wednesday, Thursday,...
Jan Feb, Mar, Apr,...
Jan, Apr Jul, Oct, Jan,...
Jan-99, Apr-99 Jul-99, Oct-99, Jan-00,...
15-Jan, 15-Apr 15-Jul, 15-Oct,...
1999, 2000 2001, 2002, 2003,...
1-Jan, 1-Mar 1-May, 1-Jul, 1-Sep,...
Qtr3 (or Q3 or Quarter3) Qtr4, Qtr1, Qtr2,...
text1, textA text2, textA, text3, textA,...
1st Period 2nd Period, 3rd Period,...
Product 1 Product 2, Product 3,...

Fill Data in Cells with Fill Handle



Use the Fill Handle to Fill Data

You can use the Fill command to fill data into worksheet cells. You can also have Excel automatically fill series of numbers, number and text combinations, dates, or time periods, based on a pattern that you establish. However, to quickly fill in several types of data series, you can select cells and drag the fill handle. The fill handle is the small black square that usually display when the mouse pointer is placed on at the lower-right corner of the cell-pointer.

Fill data into adjacent cells

  1. Select the cell(s) that contain the data that you want to fill into adjacent cells.
  2. Point the mouse to the lower-right corner of the selected cell(s). The mouse pointer changes to a small black cross.
  3. Drag the fill handle (small black cross) across the cells that you want to fill.
  4. After you drag the fill handle, the Auto Fill Options button appears so that you can choose how the selection is filled. For instance, you can choose to fill just cell formats by clicking Fill Formatting Only, or you can choose to fill just the contents of a cell by clicking Fill Without Formatting.
  5. To quickly fill a blank cell with the contents of the cell above it; press CTRL+D, to fill to the right of that cell, press CTRL+R.
  6. You can suppress AutoFill by holding down CTRL while you drag the fill handle of a selection of two or more cells. The selected values are then copied to the adjacent cells, and Excel does not extend a series.

NOTE that if you drag the fill handle up or to the left of a selection and stop in the selected cells without going past the first column or the top row in the selection, Excel deletes the data within the selection. You must drag the fill handle out of the selected area before releasing the mouse button.

Specifying Response to Invalid Data Entry



How to Specify a Response to Invalid Data Entry in Microsoft Excel

In my last post, I showed how to make data entry easier, or limit entries to certain items that you define and ensure the correct data is entered in Excel worksheet. Additionally, you can specify how you want Microsoft Office Excel to respond when invalid data is entered. Take these the following steps to create Response to Invalid Data Entry in Excel:

  • First, you have to create a list of valid entries for the drop-down list, so type the entries in a single column or row without blank cell as can be seen in this picture below.
  • You can sort the data in the order that you want it to appear in the drop-down list.
  • If you want to use another worksheet, type the list on that worksheet, and then define a name for the list. (Click Defining Name Reference to read my post on that).
    1. Select the cell where you want the drop-down list.
    2. Click on the Data tab, in the Data Tools group, click Data Validation. The Data Validation dialog box will be displayed.
    3. Click the Settings tab.
    4. In the Allow box, click List.
    5. To specify the location of the list of valid entries, do one of the following:
      • If the list is in the current worksheet, enter a reference to your list in the Source box. For example, enter =Depts or =$C$5:$C$25.
      • If the list is on a different worksheet, enter the name that you defined for your list in the Source box.
    6. Make sure that the In-cell drop-down check box is selected.
    7. 2) Click the Error Alert tab, and make sure that the "Show error alert after invalid data" is entered check box is selected.
    8. 3) Select one of the following options for the Style box:
      • To display an information message that does not prevent entry of invalid data, click Information.
      • To display a warning message that does not prevent entry of invalid data, click Warning.
      • To prevent entry of invalid data, click Stop.
    9. Type the title and text for the message (up to 225 characters).
    10. Click Ok.