
|
- Excel's AutoSave Add-in automatically saves your worksheet at preset intervals. If you don't have AutoSave installed, choose Tools, Add-Ins. When the Add-Ins dialog box opens, click the check box to the left of AutoSave and click OK. AutoSave is on the Tools menu. Choose Tools, AutoSave. When the AutoSave dialog box opens, make your selections and click OK.
- There's no built-in feature that alphabetically sorts Excel worksheets. But the following macro will:
|
Sub AlphaSort()
Dim iCount As Integer
Application.ScreenUpdating = False
iCount = Sheets.Count
For i = 1 To iCount - 1
For j = i + 1 To iCount
If Sheets(j).Name < Sheets(i).Name Then
Sheets(j).Move Before:=Sheets(i)
End If
Next j
Next i
End Sub
|
To create this macro, open the VB Editor by pressing Alt-F11. Choose Insert, Module and enter the above macro. Return to your worksheet and run the macro to sort the worksheets in the current workbook. To run the macro, press Alt-F8, select AlphaSort, and click Run.
|
- To remove tge #DIV/0! error when dividing cell values by zero insert either of the following formula -
|
=IF(denominator=0,"",numerator/denominator, where denominator is the cell that's doing the dividing and numerator is the cell that's being divided.
Alternatively use this formula =IF(ISERROR(numerator/denominator),"",numerator/denominator)
|
- Use the following underused keyboard shortcuts to boost your productivity.
|
| Type and function and then show the formula palette | Ctrl+A |
| Type and function and then show the brackets and names of the argumants | Ctrl+Shift+A |
| Insert a Hyperlink | Ctrl+K |
| Type and function and then show the formula palette | Ctrl+A |
| Edit the active cell | F2 |
| Paste the name of a range into a formula | F3 |
| Paste a function into a formula | Shift-F3 |
| Calculate all sheets in all open workbooks | F9 |
| Calculate the active worksheet | Shift-F9 |
| Autosum | Alt-= |
| Enter the date as text | Alt-; |
| Enter the time as text | Ctrl-Shift-; |
| Copy the value from the above cell | Ctrl-Shift-" |
| Copy the formula from the above cell | Ctrl-' |
| Display the AutoComplete list | Alt-down arrow |
| Create or edit a cell comment | Shift-F2 |
| Create Named ranges from row and column labels (select area first) | Ctrl-Shift-F3 |
| Display the Style dialog box | Alt-' |
| Display the Format Cells dialog box | Ctrl-1 |
| General number format | Ctrl-Shift-~ |
| Currency format (two decimal places) | Ctrl-Shift-$ |
| Percentage format (no decimal places) | Ctrl-Shift-% |
| Scientific format (two decimal places) | Ctrl-Shift-^ |
| Date format | Ctrl-Shift-# |
| Time format | Ctrl-Shift-@ |
| Number format with two decimal places, thousands separator andminus sign for negative numbers | Ctrl-Shift-! |
| Outline border | Ctrl-Shift-& |
| Remove outline borders | Ctrl-Shift-_ |
| Hide rows | Ctrl-9 |
| Unhide rows | Ctrl-Shift-( |
| Hide columns | Ctrl-0 |
| Unhide columns | Ctrl-Shift-) |
| Delete the selected cells, rows or columns | Ctrl-- |
| Insert cells, rows or columns | Ctrl-Shift-+ |
| Move clockwise round the corners of the current selection | Ctrl-. |
| Select the current region around the active cell | Ctrl-Shift-* |
| Select the current array | Ctrl-/ |
| Select all cells with comments | Ctrl-Shift-O |
| Select cells in a row that don't match the value in the active cell in that row | Ctrl-\ |
| Select cells in a column that don't match the value in the active cell in that column | Ctrl-Shift-| |
| Select only cells that are directly referred to by formulas in the selection | Ctrl-[ |
| Select all cells that are directly or indirectly referred to by formulas in the selection | Ctrl-Shift-{ |
| Select only cells with formulas that refer directly to the active cell | Ctrl-] |
| Select all cells with formulas that refer directly or indirectly to the active cell | Ctrl-Shift-} |
| Select only visible cells in the current selection | Alt-; |
| Moving between Worksheets in a Workbook | Ctrl-PgUp or Ctrl_PgDn |
| View Excels VBA (Visual Basic for Applications) Development Environment | Alt_F11 |
- To stop Excel starting up with a blank document already open run Excel with the command line 'excel.exe /n'.
- To use a named cell select a cell and select Insert->Name->Define and enter a name for the cell. Now go to another worksheet and in the requried cell enter =[defined name].
- You can easily change the font and font size without ever lifting your hands from the keyboard. To change the font, press Ctrl + Shift + F. This will select the Font box. Next you can press the Up and Down arrows to select the font you want to use. After you make a selection, press Enter. To change the font size, press Ctrl + Shift + P and then use the Up and Down to select a font size. Press Enter after you make a selection.
- When you write an Excel macro, the macro is attached to your current workbook and is not available to other workbooks. However, you can create global macros in Excel. All you have to do is put them into a special workbook named Personal.xls. To do this, open a blank worksheet. Choose File->Save As and name the worksheet Personal.xls. Go to the folder 'c:\Program Files\Microsoft Office\Office\XLStart' and click Save to save the file and close the Save As dialog. Now, run Excel. It will open with Personal.xls. Choose Window->Hide and then choose File->Save and exit Excel. Each time you open Excel, Personal.xls will open hidden. To enter a macro into Personal.xls, you must choose Window->Unhide to make the sheet available.
- When you want an Excel worksheet to scroll without scrolling the headings out of the picture, you can freeze the cells that contain the headings. Let's say that you have headings in row A. Click cell A2 and choose Window->Freeze Panes. If you'd like to prevent columns A and B (as well as row A) from scrolling, click C2 and choose Window->Freeze Panes. To unfreeze panes, choose Window->Unfreeze Panes.
- Use conditional formatting to display a different colour when the cell's date is the current date. To set up an example current date indication, click cell A1 and choose Format->Cells. When the dialog box opens, click Date and then select a date format. Now, make sure cell A1 is selected and choose Format->Conditional Formatting. When the Conditional Formatting dialog opens, under "Condition 1" select Formula Is and enter =a1-today() and then click Format. Select black text and click OK. Now, click Add and for "Condition 2" use the following entries: Cell Value Is Not Equal To 0 (zero). Click Format and select red text. Click OK to close the dialog and continue. Enter today's date in cell A1 and the date should appear in red. If you enter any other date, it will appear in black.
- When you're working with a small worksheet in Excel, there's no need to squint at the screen to see those few dozen cells. Instead, you can instruct Excel to display only the area you need to use. To do this, select the area and then choose View->Zoom. When the Zoom dialog box opens, select the "Fit selection" radio button and click OK.
- To print the spreadsheet columns on every page choose File->Page Setup. When the dialog opens, click the Sheet. Now, click the icon at the right side of the "Rows to repeat at top" entry box. When the Rows to Repeat at Top dialog box opens, click the row where your titles appear (usually the top row) and press Enter. Back in Page Setup, click OK.
- To use Find and Replace on all the worksheets in a workbook, select the first sheet and whilst holding down the Ctrl key click on the tab of the other sheets. You can now select Ctrl + H to open the replace dialog box.
- When opening a file with File->Open you can use Alt and n where is between 1 and 9 to access the toolbar buttons in the file open dialog box.
- Use the 'Application.ScreenUpdating=False' statement to turn off screen updating and speed up macros.
- To go to the bottom of a column use 'Selection.End(XLDown).Select'. To get to the far right of a row us 'Selection.End(XLToRight)'.
- Use either of the following two macros to loop through all the Worksheets in a Workbook.
|
Sub WorksheetLoop()
Dim iwsCount As Integer
Dim I AS Integer
' Set 'wsCount equal to the number of worksheets in the active workbook
iwsCount = ActiveWorkbook.Worksheets.Count
' Begin the Loop
For I = 1 To iwsCount
' Add your own code here e.g.
MsgBox ActiveWorkbook.Worksheets(I).Name
Next I
alternatively
Sub WorksheetLoop2()
' Declare Current as a Worksheet object variable
Dim Current as Worksheet
' Begin the Loop
For Each Current in Worksheets
' Add your own code here e.g.
MsgBox Current.Name
Next
|
- To paste a picture of a worksheet into Microsoft Word select the range you want in the worksheet and then hold down Shift while you choose Edit|Copy Picture. When the Copy Picture dialog opens, accept the defaults and click OK. Move to your Word document now and click where you want the picture to appear. Press Ctrl + V to paste in the picture.
|
|
|