Excel Digest

  Excel help for the rest of us

28 Jun

How to record a macro in Excel 2007

If you have a task that you perform repeatedly, then you can record all the events to achieve that task (keystrokes, mouse clicks … etc.) in a macro.

To record a macro in Excel 2007 follow these steps.

1. Click on the Developer tab. If the Developer tab is not visible, then check this post on how to show the Developer tab:

2. In the Code group Click Record Macro.

xl7macros1

3. The Record Macro window will open.

xl7macros2

4. Give a name to your macro.

5. Specify a shortcut key(optional).

6. Specify where you want to save the macro.

7. Click OK.

8. Now start performing the task which you want to record. When you are done click Stop Recording.

xl7macros3

9. Your macro is now created and is ready to be used. To run the macro:

  1. Click Macros.
  2. xl7macros4

  3. The Macros window will open.
  4. xl7macros5

  5. Select the macro then click run.

10. You can also run the macro by simply clicking the shortcut key combination.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
How to make your macros and functions available to all workbooks 
Excel 2007 User interface - Developer Tab 
A macro to print only hidden sheets in a workbook 
15 Jun

Average values based on a given criteria in Excel 2007

To average a range of values that meet a given criteria or condition, you use the AVERAGEIF function.

Syntax

AVERAGEIF(range,criteria,average_range)

Range : The group of cells to be evaluated for criteria.

Criteria: is the criteria in the form of a number, expression, cell reference, or text that defines which cells are averaged.

Average_range: is the actual set of cells to be averaged. If omitted, range is used.

Example:

In the example below we want to average the total sales for a particular salesman (Jim). So our range is B2:B13 and our criteria is “Jim”. The range to be averaged is C2:C13. The formula will be:

=AVERAGEIF(B2:B13;”Jim”;C2:C13)

The result is 1005, i.e. (2300 + 1100 + 200 + 420) / 4

xl7average1

Notes:

1. Cells in range that contain TRUE or FALSE are ignored.

2. If a cell in average_range is an empty cell, AVERAGEIF ignores it.

3. If range is a blank or text value, AVERAGEIF returns the #DIV0! error value.

4. If a cell in criteria is empty, AVERAGEIF treats it as a 0 value.

5. If no cells in the range meet the criteria, AVERAGEIF returns the #DIV/0! error value.

6. You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. In the previous example if you use “J*” in criteria then both “Jim” and “John” will be included in the average.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
How to sum values based on a criteria or condition 
How to sum values based on multiple criteria 
Excel 2007 User interface - DataTab 
06 Jun

How to change or adjust the column width in Excel 2007

1. To adjust the column width to fit the current text, move the mouse pointer to the right border of the column until it changes to a cross as shown and then double click on it.

2. To adjust the column width manually, move the mouse pointer to the right border of the column until it changes to a cross as shown, hold down the left mouse button then drag the mouse until you get the right width.

xl7colwidth1 Before

xl7colwidth2 After

3. To adjust the column width to give it fixed size:

  1. In the Home tab , Cells group click Format then Column Width
  2. xl7colwidth3

  3. The Column Width window will open.
  4. xl7colwidth4

  5. Enter the required column width.
  6. Notes:

    1. The units shown are the number of characters in the default text format.

    2. You can enter any number between 0 and 255.

    3. If you enter 0 the column will be hidden.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
How to insert update date or timestamp in a cell 
How to change page orientation in Excel 2007 
How to change tab color in Excel 2007 
30 May

How to insert background image in Excel 2007

To insert a background image in Excel 2007 follow these steps:

1. Click on the Page Layout tab.

xl7background

2. In the Page Setup group click Background. The Sheet Background window will open.

xl7background2

3. Switch to the folder where you have the image, select the image and then click Insert.

4. The selected image will show as a background in your sheet.

Note:

When you insert a background image the Background button in the Page Setup group will turn into Delete Background. You can then click on that button to remove the background.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
How to set a background for a worksheet 
Excel 2007 User interface - Page Layout Tab 
Excel 2007 User interface - the Insert Tab 
24 May

How to generate a random number within a given range

To generate a random number within a given range use the RANDBETWEEN function.

Syntax

RANDBETWEEN(bottom,top)

Bottom: is the smallest integer RANDBETWEEN will return.

Top: is the largest integer RANDBETWEEN will return.

Examples:

RANDBETWEEN (1,100) will generate numbers from 1 to 100

RANDBETWEEN (-15,2000) will generate numbers from -15 1 to 2000

Notes:

1. A new random integer number is returned every time the worksheet is calculated.

2. In Excel 2007 you can use RANDBETWEEN function directly, however in Excel 2003 (and may be earlier versions also) the function is part of the Analysis ToolPak add-in. If it is not available in your list of functions then you have to install the Analysis ToolPak. Check the following link for more help:

install and load the Analysis ToolPak add-in in Excel 2003

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
A macro to generate a list of random numbers 
Random Lookup Revisited 
Random lookup based on VLOOKUP function 
22 May

Conditional formatting with multiple rules in Excel 2007

I have two previous posts on Excel 2007 conditional formatting: One based on cell’s own value and the second based on value of another cell. This post will cover conditional formatting with multiple rules or conditions.

Suppose you have a cell formatted with this rule:

If cell value is less than zero format with Light Red Fill …. Etc.

xl7cfrule1

Now you want to add another rule:

If cell value is greater than 100 format with green Fill.

Follow these steps:

1. In the Home Tab, Styles group click Conditional Formatting, then Manage Rules.

xl7cfrule2

2. The window Conditional Formatting Rules Manager will open, and it will show the current rule.

xl7cfrule3

3. Click the New Rule button. The New Formatting Rule window will open (not shown here).

4. Add the new rule. If you need help refer to the other two posts I mentioned earlier.

5. After finishing, your list of rules will look like this:

xl7cfrule4

Note:

You can apply the same steps if you have conditional formatting based on the value of another cell.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
Conditional formatting in Excel 2007 (based on value of the current cell ) 
How to format a cell based on the value of another cell (conditional formatting) 
How to format a cell based on its value (conditional formatting) 
19 May

How to create a custom cell style in Excel 2007

Excel 2007 cell styles are helpful in giving your worksheet formatting a consistent look and feel. Excel comes with a number of built in styles. If you are not satisfied with those you can still create and modify your own styles. Here is how you can do it:

1. In the Home Tab, Styles group click Cell Styles.

xl7styles1

2. A list of the built-in styles will be shown in a grid-like format.

xl7styles2

3. Click on New Cell Style at the bottom of the window. The Style window will open.

xl7styles3

4. In the Style name textbox give a name for your style.

5. Click Format in the Style window and specify the formats you want. This include Alignment, Font, Border … etc.

6. Click OK in the Format window, Then OK in the Style window.

7. Your style will be added to the custom styles at the top of the built-in styles. From here own you can apply it to any cell you want.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
How to create a custom date format 
How to create a custom time format 
How to create, display and delete custom views 
15 May

How to show help button in Excel 2007

To show the help button or icon in Excel 2007 you need to customize the Quick Access Toolbar and add the help button there.

Follow these steps to customize:

1. Right click on the Quick Access Toolbar.
2. Click Customize Quick Access Toolbar.

xlqaccess1

3. The Excel Options window will open.

xl7options

4. On the left pane of the Excel Options window click Customize.
5. Click on the combo box labeled “Choose commands from” and select Commands NOT in the Ribbon or select All Commands.
6. Locate the Help command xl7help and double click on it. It will be moved to the quick access tool bar list to the right.

Tip

You can get Excel 2007 help by simply hitting PF1.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
Excel 2007 user interface - introduction 
How to show the developer tab in excel 2007 
How to insert background image in Excel 2007 
10 May

How to show the developer tab in excel 2007

Excel 2007 user interface does not show the developer tab in the default display. To activate or display the developer tab follow these steps:

1. Click the Microsoft Office Button.

xl7office

2. Click Excel Options, The options window will open.

xl7options

3. Click Popular.

4. Select the Show Developer tab in the Ribbon check box.

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
Excel 2007 User interface - Developer Tab 
How to record a macro in Excel 2007 
Excel 2007 User interface - View Tab 
10 May

Excel 2007 User interface - Developer Tab

Developer Tab

xl7developer

Excel 2007 user interface does not show the developer tab in the default display. If it is not shown in the ribbon then see How to show the developer tab in Excel 2007.

The developer tab consists of 4 groups:

Code

xl7code

The Code group gives you access to the visual basic editor. You can access your existing macros and write or record new ones. You can also setup macro security level (enable macros to run or disable them).

Control

xl7control

The Control group allows you to insert user controls, switch between design mode and normal mode, access control properties, view code within controls or run a dialogue (user form).

XML

xl7xml

The XML group allows you to add, import or export XML maps into you workbook.

Modify

xl7modify In the Modify group you can specify custom document information panel template (contains author, title, subject ..etc.)

Posts on Excel 2007 user interface:

  1. Introduction
  2. The Home tab
  3. The Insert tab
  4. The Page Layout tab
  5. The Formulas tab
  6. The Data Tab
  7. The Review Tab
  8. The View Tab
  9. The Developer Tab

Print This Post Print This Post

Possibly Related Posts (automatically generated)

   
Excel 2007 User interface - Review Tab 
Excel 2007 user interface - introduction 
Excel 2007 User interface - Formulas Tab 

© 2009 Excel Digest | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo