Microsoft Excel Product Support

Microsoft Excel Help Contents

When You Have a Question

Types of Product Support

Answers to Common Questions

Microsoft Product Support Services in the United States

Microsoft Product Support Services Worldwide


Using automated telephone support and fax services
To use automated telephone support and fax services

Microsoft Excel Help Contents

If you have a touch-tone telephone, you can hear recorded responses in English to common Microsoft Excel questions 24 hours a day, seven days a week on the Microsoft Interactive Voice Support Service. You can also order application notes in English that will be sent to your fax machine.

To reach the Interactive Voice Support Service for Microsoft Excel, call (206) 635-7071.

After you reach the Interactive Voice Support Service, use the following keys to move through the automated system:

To advance to the next message, press the ASTERISK (*) key.

To repeat the current message, press the 7 key.

To return to the beginning of the Interactive Voice Support Service, press the POUND SIGN (#) key.

See Also

Help

Types of Product Support


Using Microsoft forums on CompuServe
To use Microsoft forums on CompuServe

Microsoft Excel Help Contents

You can contact Microsoft Product Support staff on several CompuServe forums. To get information through CompuServe, do one of the following:

If you already are a CompuServe member, type go microsoft at any ! prompt.

For an introductory CompuServe membership kit specifically for users of Microsoft software, call (800) 848-8199 and ask for operator 230.

See Also

Help

Types of Product Support


Getting product support with a Telecommunications Device for the Deaf (TDD)
To get product support with a Telecommunications Device for the Deaf (TDD)

Microsoft Excel Help Contents

You can telephone the Microsoft Product Support staff with a Telecommunications Device for the Deaf (TDD) from 6 A.M. to 6 P.M. (Pacific time) Monday through Friday.

To use a TDD to reach Microsoft Product Support, call (206) 635-4948.

See Also

Help

Types of Product Support


Locating Microsoft product training and consultation services
To locate Microsoft product training and consultation services

Microsoft Excel Help Contents

Within the United States, Microsoft offers two special services to help you take full advantage of Microsoft Excel.

Microsoft Authorized Training Centers

Microsoft has authorized training centers across the United States offering the following programs:

Customized training for users and trainers

Training materials development

Consulting services

For information about the training center nearest you, call Microsoft End-User Sales and Service at (800) 426-9400.

Microsoft Consultant Relations Program

Microsoft's Consultant Relations Program can refer you to an independent consultant in your area of the United States. These consultants are skilled in the following areas:

Macro development and translation

Database development

Customized interface design

For information about consultants in your area, call the Microsoft Consultant Relations Program at (800) 227-4679, extension 56042.

Microsoft's support services are subject to Microsoft's prices, terms, and conditions in place at the time the service is used.

See Also

Help

Types of Product Support


Microsoft Product Support Services Worldwide

Microsoft Excel Help Contents

If you are outside the United States and have a question about Microsoft Excel, look in the printed product documentation or online Help, check the README files that come with your product disks, and check the Answers to Common Questions topic in Help. If you cannot find the answer, you can receive product support, or information on how to receive product support, by contacting the Microsoft subsidiary office that serves your country.  Microsoft subsidiary offices and the countries they serve are listed below.

Microsoft's support services are subject to Microsoft's prices, terms, and conditions in place at the time the service is used.

Before you telephone Microsoft Product Support Services

When you call, you should be at your computer with Microsoft Excel running and  the product documentation at hand. Have your document open and be prepared to give the following information:

The version of Microsoft Excel that you are using.

The type of hardware you are using, including network hardware, if applicable.

The operating environment that you are using.

The exact wording of any messages that appeared on your screen.

A description of what happened and what you were doing when the problem occurred.

How you tried to solve the problem.

Run the Checkup macro to view information about your system

The Checkup macro examines your computer and displays information about your Microsoft Excel settings and your operating system.  This information may be useful to the Product Support technician, should you need to call for assistance.

To run the Checkup macro

1	Click the Open File tool, or choose Open from the File menu.

2	Select the CHECKUP.XLM file in the CHECKUP subdirectory of the LIBRARY directory.

The macro displays the information on your screen.

3	To print the information, choose the Print button.

4	To close the display, choose the Close button.

To contact Microsoft Product Support Services worldwide

The following table gives addresses and phone numbers for Microsoft subsidiaries worldwide:

Countries	Address/Telephone Numbers

England  Scotland  Wales  Northern Ireland  Republic of Ireland Greece	Microsoft Ltd. Microsoft Place Wharfedale Road Winnersh Triangle Wokingham, BERKS RG11 5TP UNITED KINGDOM Phone: (44) (734) 270000 Fax: (44) (734) 270002 Technical support: (44) (734) 271000  Upgrades: (44) (81) 893-8000
Sweden Denmark Finland Iceland	Microsoft AB Finlandsgatan 30 Box 27 S-164, 93 Kista SWEDEN Phone: (46) (8) 752-5600 Telex: 8126132 MICRAB AB Fax: (46) (8) 750-5158 Technical support:      (Applications) (46) (8) 752-6850      (Systems) (46) (8) 752-6050
Norway	Microsoft Norway AS Gjerdrumsvei 21 N-0881 Oslo NORWAY Phone: (47) (2) 95 06 65 Fax: (47) (2) 95 06 64 Technical support: (47) (2) 18 35 00
France French Polynesia	Microsoft France 18, Avenue du Quebec Zone de Courtaboeuf 91957 Les Ulis Cedex FRANCE Phone: (33) (1) 69-86-46-46 Telex: MSPARIS 604322F Fax: (33) (1) 64-46-06-60 Technical support:      (33) (1) 69-86-10-20
Netherlands Luxembourg	Microsoft BV P.O. Box 364 2130 AJ Hoofddorp NETHERLANDS Phone: 02503-13181 Telex: 74507 MSOFT NL Fax: 02503-37761 Bboard: 02503-34221 Technical support:      (Dutch) 02503-77877      (English) 02503-77853  Technical support fax: 02503-24304
Switzerland Liechtenstein	Microsoft AG Alte Winterthurerstrasse 14A CH-8304 Wallisellen SWITZERLAND Phone: (41) (1) 839 61 11 Fax: (41) (1) 831 08 69 Technical support: Swiss and German   01/ 342.21.52      MS-DOS   01/ 342.40.36      All programming languages except:       BASIC PDS, Quick Basic, Visual       Basic, COBOL   01/ 342.40.81      Macintosh software   01/ 342.40.82      Microsoft Excel for Windows,       Multiplan, Powerpoint for Windows   01/ 342.40.83      Word (MS-DOS), Windows Write   01/ 342.40.84      Chart, Micorsoft Works, Mouse,       Flight Simulator, Paintbrush,       Project (MS-DOS), Project for       WIndows   01/ 342.40.85      Microsoft Windows, Networks, Mail       for PC Networks   01/ 342.40.86      BASIC PDS, Quick Basic, Visual       Basic, COBOL   01/ 342.40.87      Word for Windows French   022/ 738.96.88      All Microsoft products
Belgium	Microsoft NV Rue Colonel Bourg 123-125 1140 Brussels BELGIUM Phone: 02-7322590 Fax: 02-7351609 Bboard: (31) 2503-34221 Technical support:      (Dutch) 02-5133274      (English) 02-5023432      (French) 02-5132268
Austria	Microsoft Ges.m.b.H. Favouritenstrasse 321 A-1108 Vienna AUSTRIA Phone: (43) (222) 68 76 07 Fax: (43) (222) 68162710
Italy	Microsoft SpA Centro Direzionale Milano Oltre Palazzo Tiepolo Via Cassanese, 224 20090 Segrate-MI ITALY Phone: (39) (2) 269121 Telex: 340321 I Fax: (39) (2) 210-72020 Technical support:      (Applications) (39) (2) 26901351      (Systems)(39) (2) 26901354
Portugal	MSFT, Lda. Galerias Alto da Barra, Piso 1 Av. das Descobertas 2780 Oeiras PORTUGAL Phone: 351 1 4412205 Fax: 351 1 4412101
Spain	Microsoft Iberica SRL Avda. Colmenar Viejo Sector Foresta 2, 3, 4 28760 Tres Cantos, Madrid SPAIN Phone: (34) (1) 804-0000 Fax: (34) (1) 803-8310 Technical support: (34) (1) 803-9960
Germany Eastern Europe Baltic states	Microsoft GmbH Edisonstrasse 1 8044 Unterschleissheim GERMANY Phone: 089/ 3176-0 Telex: (17) 89 83 28 MS GMBH D Fax: 089/ 3176-1000 Technical support:  089/ 3176-1110      Microsoft Windows  089/ 3176-1120      Microsoft Excel for Windows,      Multiplan, Powerpoint for Windows  089/ 3176-1130      Word (MS-DOS), Windows Write,      Pageview  089/ 3176-1131      Word for Windows  089/ 3176-1140      Chart, Microsoft Works, Mouse,      Flight Simulator, Paintbrush, Easy      Cad, Project (MS-DOS), Project for      Windows  089/ 3176-1150      C-Compiler, Fortran, Pascal,      Assembler  089/ 3176-1151      MS-DOS, Basic, COBOL  089/ 3176-1160      Macintosh Software Eastern Europe/Baltic states      fax: (49) (89) 3176-3800
Canada	Microsoft Canada, Inc. 320 Matheson Blvd. W. Mississauga, ONT. L5R 3R1 CANADA Phone: 1 (416) 568-0434 Fax: 1 (416) 568-4689 Technical support: 1 (416) 568-3503
Mexico	Microsoft Mexico, S.A. de C.V. Blvd. M. Avila Camacho No. 32 2o. Piso Lomas de Chapultepec Mexico, D.F., 11000 MEXICO Phone: (52) (5) 325-0910 Fax: (52) (5) 202-0399 Technical support: (52) (5) 325-0912 Sales: (52) (5) 325-0911
Venezuela Colombia Ecuador Central America Caribbean countries Puerto Rico Bermuda	Corporation MS 90 de Venezuela S.A. Centro Profesional Eurobuilding Piso 7, Oficina 7-E Calle La Guairita Chuao, Caracas VENEZUELA Phone: 0058.2.914739 Fax: 0058.2.923835
Brazil	Microsoft Informatica Ltda. Av. Eng. Luiz Carlos Berrini 1253-13 Andar CEP 04571 Sao Paulo SP BRAZIL Phone: (55) (11) 530-4455 Fax: (55) (11) 240-2205 Technical support: (55) (11) 530-4455
Argentina Bolivia Chile Paraguay Peru Uruguay	Microsoft de Argentina S.A. Avenida del Libertador 602 Piso 21-A 1010 Buenos Aires ARGENTINA
Australia New Zealand Papua New Guinea	Microsoft Pty. Ltd. 65 Epping Road P.O. Box 91 North Ryde, NSW 2113 AUSTRALIA Phone: (612) 870-2200 Telex: MSOFT AA 75253 Fax: (612) 805-1108 Technical support: (612) 870-2131
Japan	Microsoft Co. Ltd. K Building, 16F 7-5-25, Nishi Shinjuku Shinjuku-ku, Tokyo 160 JAPAN Phone: (81) (3) 3363-1200 Fax: (81) (3) 3363-1281 Technical support:    (81) (3) 3363-0160           MS-DOS Applications    (81) (3) 3363-5040           Windows Applications    (81) (3) 3363-7610           Language Products           (MS-C, MASM, Quick-C)    (81) (3) 3363-0170           Language Products           (MS-BASIC, MS-FORTRAN,             Visual BASIC, Quick Basic)    Fax: (81) (3) 3363-9901           All products
Korea	Microsoft CH DongSeong Building 158-9 SamSeong-Dong, GangNam-Gu Seoul, 135-090 KOREA Phone: (82) (2) 552-9505 Fax: (82) (2) 555-1724 Technical support: (82) (2) 563-9230
Singapore	Microsoft Singapore PTE Ltd. 10 Anson Road #21-15 International Plaza Singapore 0207 SINGAPORE Phone: (65) 227-6833 Fax: (65) 227-6811
Republic of China	Microsoft Taiwan Corp. P.O. Box 27-16 10th Fl., No.3 Min Sheng East Road, Sec. 3 Taipei, Taiwan REPUBLIC OF CHINA Phone: (886) (2) 504-3122 Fax: (886) (2) 504-3121
India	Microsoft Corporation India Liaison Office c/o Tata Unisys Ltd. Creative, 10 Masjid Moth Commercial Complex Greater Kailash II, New Delhi - 48 INDIA Phone: (91) (11) 644-4457 Telex: 317 1324 TBLD IN Fax: (91) (11) 644-4469
Any other country	Microsoft Corporation Attention: International Customer      Service One Microsoft Way Redmond, WA 98052-6399 USA Phone: (206) 936-8661 Telex: 160520 Fax: (206) 93 MS FAX


Types of Product Support

Microsoft Excel Help Contents

Using automated telephone support and fax services

Using the Microsoft forums on CompuServe

Locating product training and consultation services

Calling Microsoft Product Support Services in the United States

Calling Microsoft Product Support Services outside the United States

Getting product support with a Telecommunications Device for the Deaf (TDD)


Microsoft Product Support Services in the United States

Microsoft Excel Help Contents

If you have a question about Microsoft Excel, look in the printed product documentation or online Help, check the README files that came with your product disks, and check the Answers to Common Questions topic in Help (see below). If you cannot find the answer, contact Microsoft Product Support Services from 6 A.M. to 6 P.M. (Pacific time) Monday through Friday.

Microsoft's support services are subject to Microsoft's prices, terms, and conditions in place at the time the service is used.

Before you telephone Microsoft Product Support Services

When you call, you should be at your computer with Microsoft Excel running and  the product documentation at hand. Have your document open and be prepared to give the following information:

The version of Microsoft Excel that you are using.

The type of hardware you are using, including network hardware, if applicable.

The operating environment that you are using.

The exact wording of any messages that appeared on your screen.

A description of what happened and what you were doing when the problem occurred.

How you tried to solve the problem.

Run the Checkup macro to view information about your system

The Checkup macro examines your computer and displays information about your Microsoft Excel settings and your operating system.  This information may be useful to the Product Support technician, should you need to call for assistance.

To run the Checkup macro

1	Click the Open File tool, or choose Open from the File menu.

2	Select the CHECKUP.XLM file in the CHECKUP subdirectory of the LIBRARY directory.

The macro displays the information on your screen.

3	To print the information, choose the Print button.

4	To close the display, choose the Close button.

To call Microsoft Product Support Services for Microsoft Excel

To reach support staff most familiar with Microsoft Excel, call (206) 635-7070.

See Also

Help

Answers to Common Questions

Using automated telephone support and fax services

Using the Microsoft forums on CompuServe

Locating product training and consultation services

Getting product support with a Telecommunications Device for the Deaf (TDD)


When You Have a Question

Microsoft Excel Help Contents

Microsoft offers a variety of support options to help you get the most from Microsoft Excel.

If you have a question about Microsoft Excel, look in the printed product documentation or online Help, check the README files that came with your product disks, and check the Answers to Common Questions topic in Help (see below). You can also check a number of other sources, including automated telephone support and fax services, online databases such as CompuServe, and Microsoft training and consultation services.

If you cannot find the answer, contact Microsoft Product Support Services in the United States or, outside the United States, at the subsidiary office that serves your area.

For information about Microsoft fee-based support options, call Microsoft Sales at (800) 227-4679 from 6:30 A.M. to 5 P.M. (Pacific time) Monday through Friday.

Microsoft's support services are subject to Microsoft's prices, terms, and conditions in place at the time the service is used.

See Also

Help

Types of Product Support

Answers to Common Questions

Microsoft Product Support Services in the United States

Microsoft Product Support Services Worldwide


Answers to Common Questions about Microsoft Excel

Microsoft Excel Help Contents

The following are 20 of the most common questions asked about Microsoft Excel. Scan this list before you call Microsoft Product Support Services--maybe you can save yourself the phone call!

Each of the following questions is followed by the word ANSWER. Click this underlined word to get the corresponding answer to the preceding question.

General

1	How do I set up a worksheet, chart, macro sheet, or workbook so that it automatically opens each time I start Microsoft Excel?   ANSWER

2	How can I make page breaks visible?   ANSWER

3	How can I change the default font?   ANSWER

4	How do I enter a fraction so that it isn't displayed as a date?   ANSWER

5	How can I change the default directory so that it is used automatically?   ANSWER

6	What is the best way to create and save files that will be used as data files for a word-processing mail-merge operation?   ANSWER

7	What happened to the Calculate Now command on the Options menu?   ANSWER

8	What happened to the Show Info command on the Window menu?   ANSWER

Formulas

9	How can I count the number of times a particular entry occurs in a range of cells?   ANSWER

10	How can I write a formula that totals only cells containing a particular value?   ANSWER

11	How can I write a formula that totals cells that are adjacent to cells containing particular entries?   ANSWER

Charts

12	How do I select a single point in a chart data series, rather than selecting the entire series?   ANSWER

13	How do I edit a chart that I created directly on my worksheet?   ANSWER

14	How do I enter more than one line of text in a chart label?   ANSWER

Macros

15	How do I write a macro so that after it asks the user for information, the information is then returned to the worksheet?   ANSWER

16	How can I write looping macros so that repetitive commands can be carried out easily?   ANSWER

17	How can I refer to cells from a macro without slowing down the running of the macro by moving the active cell?   ANSWER

18	How do I set up a document so that it runs a macro each time I open it?   ANSWER

19	How can I open an add-in macro sheet so that I can edit it?   ANSWER

20	How do I select cells with a macro? The recorder doesn't always seem to record the same selection when I use the keyboard.   ANSWER

See Also

Help

When You Have a Question

Types of Product Support

Microsoft Product Support Phone Numbers in the United States

Microsoft Product Support Services Worldwide


Using the FORMULA function to return values to a worksheet

Microsoft Excel Help Contents

Q:  How do I write a macro so that after it asks the user for information, the information is then returned to the worksheet?

A:  Each function in a macro returns a value to the cell on the macro sheet in which the function resides. To place that value on a worksheet, you must use a function to specifically do so. In the case of a command macro, such as the one described in the question above, use the FORMULA function to return values to a worksheet. This function is the macro equivalent of entering data into a cell and then pressing the ENTER key. The syntax for the FORMULA function is:

FORMULA(formula_text,reference)

The argument formula_text can either be a value or a reference to another cell containing a value. The optional argument reference is the location where you want the value placed. If reference is omitted, the value is placed in the active cell.

For example, the following macro uses the INPUT function to collect a value from the user, and then places that value on a worksheet using the FORMULA function.

FORMULA example

A2:	=INPUT("Please enter a number",1)

A3:	=FORMULA(A2,SHEET1.XLS!$A$1)

A4:	=RETURN()

The FORMULA function uses a reference to the cell containing the INPUT function as the argument for formula_text. If the user entered 1234 in response to the message presented by the INPUT function, then 1234 is the value returned to cell A2. Then the FORMULA function takes this value and places it in cell A1 of the worksheet named SHEET1.XLS.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

Microsoft Excel Function Reference


Building conditional formulas for counting specific entries

Microsoft Excel Help Contents

Q:  How can I count the number of times a particular entry occurs in a range of cells?

A:  By using a combination of the SUM and IF functions, you can create a conditional formula that will count the number of occurrences of a given value or text string. The following formula shows a method of counting the number of times the text string "abc" occurs in the range A1:B5.

{=SUM(IF(A1:B5="abc",1,0))}

This formula is an array formula, which you enter into a single cell by pressing CTRL+SHIFT+ENTER after you finish typing it in the cell. Do not type the braces ({}) shown in the example; when you enter the formula as an array formula, Microsoft Excel adds braces automatically, as a means of array identification.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

Microsoft Excel Function Reference


Selecting a single point in a data series

Microsoft Excel Help Contents

Q:  How do I select a single point in a chart data series, rather than selecting the entire series?

A:  Usually in a Microsoft Excel chart, when you click any point in a data series, the entire series is selected. To select a single point in the series, hold down the CTRL key while clicking the point.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 13, "Editing a Chart"


Setting up documents to open automatically at startup

Microsoft Excel Help Contents

Q:  How do I set up a worksheet, chart, macro sheet, or workbook so that it automatically opens each time I start Microsoft Excel?

A:  Documents that you want Microsoft Excel to open at startup can be placed in the XLSTART directory, which is located in the same directory as the Microsoft Excel program.

Any documents placed in this location that can be opened by Microsoft Excel will be opened automatically when you start the program. This includes worksheets, macro sheets, chart documents, workbook documents, add-ins, and custom applications. The only exceptions are template documents. Rather than opening template documents at startup, Microsoft Excel lists them as options when you choose New from the File menu.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 4, "Managing Document Files"


Creating looping macros

Microsoft Excel Help Contents

Q:  How can I write looping macros so that repetitive commands can be carried out easily?

A:  Microsoft Excel provides the FOR, FOR.CELL, and WHILE functions which enable you to create looping structures similar to those found in many programming languages. Loops enable you to create macros that repeat a set of commands a number of times.

The FOR function

The FOR loop is used when you want to perform a set of commands a fixed number of times, which are determined before entering the loop. The syntax of the FOR function is:

FOR(counter_text,start_num,end_num,step_num)

The counter_text argument indicates the name of the loop counter. When you run the macro, this name is defined by Microsoft Excel in the Define Name dialog box, which holds the current value of the counter. The start_num and end_num arguments are the first and last value you want to assign to the counter, while the optional step_num argument is the increment you want the counter to advance each time the macro repeats. In other words, you can tell the FOR function to start the operation at 1 (start_num), repeat the operation 10 times (end_num), and add 1 (step_num) to the value of counter_text each time the operation is performed. (If you omit step_num, Microsoft Excel assumes 1 step as the default.)

For example, the following FOR-NEXT loop will run five times, and will apply shading to every fifth cell in a column, starting with the active cell.

FOR-NEXT example

A2:	=FOR("counter",1,5,1)

A3:	=BORDER(0,0,0,0,0,1)

A4:	=SELECT("R[5]C")

A5:	=NEXT()

A6:	=RETURN()

In the BORDER function above, the numbers 0 and 1 represent FALSE and TRUE, respectively.

The FOR.CELL function

The FOR.CELL loop is used when you want to perform a set of commands on every cell in a specified range. The syntax for the FOR.CELL function is:

FOR.CELL(ref_name,area_ref,skip_blanks)

The ref_name argument is defined by Microsoft Excel in the Define Name dialog box, and indicates the cell currently being evaluated. When you run the macro, each time the loop is repeated the definition of this name changes, to the reference of the next cell to be evaluated in the loop. The optional area_ref argument indicates the range of cells you want the FOR.CELL-NEXT loop to evaluate. If omitted, the current selection is used. The optional skip_blanks argument is a logical TRUE or FALSE indicating whether you want to skip blank cells in the area_ref range.

For example, the following macro multiplies by 100 each value in the range A1:D10 on the active worksheet.

FOR.CELL-NEXT example

A2:	=FOR.CELL("current",!A1:D10,TRUE)

A3:	=FORMULA(current*100,current)

A4:	=NEXT()

A5:	=RETURN()

The While function

The WHILE loop is used to perform a set of commands as long as a certain condition is met. The syntax of the WHILE function is:

WHILE(logical_test)

The logical_test argument is a value or a formula that evaluates to TRUE or FALSE. As long a the argument is TRUE, the loop will continue. When the argument becomes FALSE, the macro skips to the cell after the NEXT function.

For example, the following macro contains a WHILE loop that continues to work down a column of cells until it encounters a blank cell. If the active cell contains the letter "A," the macro replaces the letter with the word "Excellent."

WHILE-NEXT example

A2:	=WHILE(NOT(ISBLANK(ACTIVE.CELL())))

A3:	=IF(ACTIVE.CELL()="A",FORMULA("Excellent",ACTIVE.CELL()))

A4:	=SELECT("R[1]C")

A5:	NEXT()

A6:	RETURN()

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 7, "Designing and Writing a Command Macro"


Using the OFFSET function

Microsoft Excel Help Contents

Q:  How can I refer to cells from a macro without slowing down the running of the macro by moving the active cell?

A:  You can use the OFFSET function to return either the reference or the contents of another cell. You simply need to specify the number of rows and columns that the cell you want is offset from another specified cell. In this way, you can refer to another cell without first activating that cell, thereby speeding up the macro. The syntax of the function is:

OFFSET(reference,rows,columns,height,width)

The reference argument is the point from which the offset is to originate. This can be the cell containing the OFFSET function, another cell on the macro sheet, or a cell on a worksheet. The rows and columns arguments represent the number of rows and columns from the reference cell that the cell you want is located. Positive numbers indicate cells to the right or below the reference cell, while negative numbers indicate cells above or to the left of the reference cell. The optional height and width arguments allow you to return a range of cells starting at the upper-left corner of the cell determined by the row and column arguments.

Both of the following examples produce the same result: entering a series of numbers from 1 to 100 into cells A1 through A100 on the active worksheet. The first macro uses the SELECT function, while the second macro uses the OFFSET function, and is thus much faster.

Macro A--SELECT example

A2:	=SELECT(!A1)

A3:	=FOR("n",1,100)

A4:	=FORMULA(n,ACTIVE.CELL())

A5:	=SELECT("R[1]C")

A6:	=NEXT()

A7:	=RETURN()

Macro B--OFFSET example

A2:	=FOR("n",1,100)

A3:	=FORMULA(n,OFFSET(!A1,n-1,0))

A4:	=NEXT()

A5:	=RETURN()

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 7, "Designing and Writing a Command Macro"


Creating Auto_Open macros

Microsoft Excel Help Contents

Q:  How do I set up a document so that it runs a macro each time I open it?

A:  You can use the Auto_Open feature to run a macro each time you open a document. Use the following procedure:

1	Open the document that you want to run the macro upon opening. This can be either a macro sheet or a worksheet.

2	From the Formula menu, choose Define Name.

3	In the Name box, type Auto_Open

4	In the Refers To box, type the reference of the macro that you want to run, or use the File or Window menu to switch to the macro sheet and click the first cell of the macro you want to use.

5	Choose the OK button.

Now, each time the document is opened, Microsoft Excel automatically opens the macro sheet and runs the macro that you used to define the Auto_Open name. You can also define an Auto_Close name using the same method, which will run a specified macro each time a document is closed. In addition, the Auto_Activate and Auto_Deactivate names are used to switch to and from other documents automatically when a document is opened.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 8, "Creating a Custom Application"


Opening add-in macro sheets for editing

Microsoft Excel Help Contents

Q:  How can I open an add-in macro sheet so that I can edit it?

A:  To open an add-in macro sheet, follow this procedure:

1	From the File menu, choose Open.

2	In the file list, select the add-in macro sheet you want to open.

3	While holding down the SHIFT key, choose the OK button.

If the "Revert to Saved?" dialog box is displayed, hold down the SHIFT key and choose the OK button. In this case, when the add-in macro sheet is opened, it is hidden.

To unhide the add-in macro sheet

1	From the Window menu, choose Unhide.

2	Select the add-in macro sheet from the list.

3	Choose the OK button.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 8, "Creating a Custom Application"


Using SELECT functions in macros

Microsoft Excel Help Contents

Q:  How do I select cells with a macro? The recorder doesn't always seem to record the same selection when I use the keyboard.

A:  When you use shortcut keys such as CTRL+SHIFT+DOWN ARROW to select cells while recording a macro, Microsoft Excel records only the selection of cells containing data, rather than the action of selecting the entire worksheet column, as does the CTRL+SHIFT+DOWN ARROW key combination.

If you want to write a macro to select cells in a column that may contain different numbers of active cells at different times, you need to duplicate the effect of using the shortcut key. The following macros show examples of three different selection situations and how the macros are written to duplicate the effect of selection shortcut keys.

The first example makes a selection from the active cell to the end of the current column:

SELECT.END example

A2:	=SET.NAME("first_cell",ACTIVE.CELL())

A3:	=SELECT.END(4)

A4:	=SELECT(first_cell:ACTIVE.CELL(),first_cell)

A5:	=RETURN()

You can use the SELECT.END function to extend a selection in any one of the four directions. The arguments to the SELECT.END function are as follows:

1	Left

2	Right

3	Up

4	Down

The second example makes a selection from the active cell to the last cell in the worksheet:

SELECT.LAST.CELL example

A2:	=SET.NAME("first_cell",ACTIVE.CELL())

A3:	=SELECT.LAST.CELL(4)

A4:	=SELECT(first_cell:ACTIVE.CELL(),first_cell)

A5:	=RETURN()

The third example makes a selection from the active cell to the first cell in the worksheet:

SELECT example

A2:	=SELECT(!A1:ACTIVE.CELL(),ACTIVE.CELL())

A3:	=RETURN()

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 7, "Designing and Writing a Command Macro"


Building conditional formulas for counting specific values

Microsoft Excel Help Contents

Q:  How can I write a formula that totals only cells containing a particular value?

A.  By using a combination of the SUM and IF functions, you can create a conditional formula that will total only the occurrences of a given value. The following formula shows a way you can total all the cells that contain the number 4 in the range A1:C4.

{=SUM(IF(A1:C4=4,A1:C4,0))}

This formula is an array formula, which you enter by pressing CTRL+SHIFT+ENTER after you finish typing it into the cell. Do not type the braces ({}) shown in the example; when you enter the formula as an array formula, Microsoft Excel adds braces automatically, as a means of array identification.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

Microsoft Excel Function Reference


Building conditional formulas for totaling adjacent cells

Microsoft Excel Help Contents

Q:  How can I write a formula that totals cells that are adjacent to cells containing particular entries?

A.  By using a combination of the SUM and IF functions, you can create a conditional formula that will total only those cells that are adjacent to a given value in another column. The following formula shows a way you can total only those cells in the range B1:B6 where the number 1 appears in the corresponding rows in column A.

{=SUM(IF(A1:A6=1,B1:B6,0))}

This formula is an array formula, which you enter by pressing CTRL+SHIFT+ENTER after you finish typing it into the cell. Do not type the braces ({}) shown in the example; when you enter the formula as an array formula, Microsoft Excel adds braces automatically, as a means of array identification.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

Microsoft Excel Function Reference


Editing an embedded chart

Microsoft Excel Help Contents

Q:  How do I edit a chart that I created directly on my worksheet?

A:  When you use the ChartWizard tool to create an embedded chart directly on a Microsoft Excel worksheet, you can select many of the available formatting options as the ChartWizard steps you through the process. When you use the Preferred Chart tool to create a chart directly on a Microsoft Excel worksheet, the chart takes on the default format that is defined for the current Microsoft Excel session. Using either method, the chart cannot be edited directly until you open it in a separate Microsoft Excel chart document.

To create a Microsoft Excel chart document from an embedded chart

Double-click the embedded chart on the worksheet.

When you do this, the chart menu bar and toolbar become visible, and the chart is displayed in a chart window indicating that you are in the Microsoft Excel charting environment. You can now use the full range of Microsoft Excel's chart editing and formatting features. When you finish editing the chart, you can save it as a separate document, if you want. Any changes that you make to the chart document will be reflected in the original embedded chart on the worksheet. To switch back to the worksheet containing the embedded chart, choose its name from the list of open documents on the Window menu.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 12, "Creating a Chart"


Entering multiple lines in a chart text label

Microsoft Excel Help Contents

Q:  How do I enter more than one line of text in a chart label?

A:  Normally, when you press the ENTER key while typing a chart label, Microsoft Excel assumes that you have finished entering the label and does not interpret the action as a carriage return. If you want to enter additional lines in a chart label, hold down the CTRL key while pressing ENTER.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 13, "Editing a Chart"

Chapter 14, "Formatting a Chart"


Making automatic page breaks visible

Microsoft Excel Help Contents

Q:  How can I make page breaks visible?

A:  Automatic page breaks (those inserted automatically by Microsoft Excel) are not initially displayed. Manual page breaks (those you enter by choosing the Set Page Break command from the Options menu) are always displayed. You can select the Automatic Page Breaks option in the Display dialog box to make page breaks visible for the active document only during the current Microsoft Excel session. If you close and then reopen the document, you must select the Automatic Page Breaks check box again.

To make page breaks visible

1	From the Options menu, choose Display.

2	Select the Automatic Page Breaks check box.

3	Choose the OK button.

This check box may already be selected, but you still cannot see the page breaks on the screen. The probable reason is that the page break occurs at the same location as a border. The border "covers" the page break, making it invisible. You can either remove the border or scroll to an unused area to the right in the worksheet to check the location of page breaks.

See Also

Help

Display Command (Options Menu)

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 16, "Printing"


Changing the default font

Microsoft Excel Help Contents

Q:  How can I change the default font?

A:  One method of changing the default font is to use the Style command on the Format menu to change the Normal style for the active document. This method changes the default font for a single document only. However, you can save this document as a template and store it in your XLSTART directory, so that you can open a new document with the default font you want at any time using the New command on the File menu. The XLSTART directory is located in the same directory as the Microsoft Excel program.

To change the Normal style (default font) for the active document

1	From the Format menu, choose Style.

2	Choose the Define button.

3	Under Change, choose the Font button.

4	Select the font and font size you want to use.

5	Choose the OK button to close the Font dialog box.

6	Choose the OK button to close the Style dialog box.

To save a document as a template

1	From the File menu, choose Save As.

2	In the Save File As Type box, select Template.

3	 In the File Name box, type a name for your template.

4	Switch to the XLSTART directory.

5	Choose the OK button.

Another method you can use to change the default font involves modifying the EXCEL4.INI file, which is found in your WINDOWS directory (or wherever the Windows files are stored on your disk). This method changes the default font that is active for all new documents.

To change the default font for all documents

1	Using a text editor such as Notepad, open the EXCEL4.INI file.

2	Locate the section starting with the heading [Microsoft Excel].

3	Type font=<font name>,<size> anywhere following the section heading.

For example, to change the default font to 8 point Roman, you would type

font=Roman,8

after the [Microsoft Excel] section heading. If a font= entry already exists after the [Microsoft Excel] section heading, replace the indicated font name and size with the ones you want Microsoft Excel to use.

See Also

Help

Style Command (Format Menu)

Save As Command (File Menu)

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 7, "Formatting a Worksheet"


Entering fractions without integer values

Microsoft Excel Help Contents

Q:  How do I enter a fraction so that it isn't displayed as a date?

A:  When entering fractional values without integer values (such as 1/2 instead of 1 1/2) you must first type a zero followed by a space before typing the fraction. If you do not do this, Microsoft Excel interprets the fractional value as a date value. For example:

If you type	Microsoft Excel displays

1/2	2-Jan

0 1/2	1/2 or 0.5

14/7	"14/7" as text

0 14/7	2

Note that "14/7" is displayed as text because it is not a valid date value.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 5, "Creating a Worksheet"


Using arrow keys in the formula bar

Microsoft Excel Help Contents

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 6, "Editing a Worksheet"


Changing the default directory

Microsoft Excel Help Contents

Q:  How can I change the default directory so that it is used automatically?

A:  To change the default directory that Microsoft Excel uses when you choose the Open command on the File menu, you need to change the EXCEL4.INI file, which is found in your WINDOWS directory (or wherever the Windows files are stored on your hard drive). This method changes the default directory that is active when you first start the Microsoft Excel program.

To change the default directory

1	Using a text editor such as Notepad, open the EXCEL4.INI file.

2	Locate the section starting with the heading [Microsoft Excel].

3	Type open=/p <path> anywhere following the section heading.

4	Save the EXCEL4.INI file as plain text.

For example, to change the default directory to C:\WORK, you would type

open=/p c:\work

after the [Microsoft Excel] section heading. If an open= entry already exists after the [Microsoft Excel] section heading, replace the path with the one you want Microsoft Excel to use.

See Also

Help

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 4, "Managing Document Files"


Saving data files for word processing programs

Microsoft Excel Help Contents

Q:  What is the best way to create and save files that will be used as data files for a word-processing mail-merge operation?

A:  The Microsoft Excel CSV (comma separated values) file format is an excellent way to save files for use as word-processing data documents.

To save a document in CSV format

1	From the File menu, choose Save As.

2	In the Save File As Type list, select CSV.

3	Choose the OK button.

For mailing labels, you will probably want Microsoft Excel to display the leading zeros required in many ZIP codes (such as 02345 or 02345-6789).

To display leading zeros

1	Select the column you want to format for ZIP codes.

2	From the Format menu, choose Number.

3	In the Code box, type 00000 (or 00000-0000 for ZIP+4 style codes).

4	Choose the OK button.

Now, when you type ZIP codes with leading zeros, they will be displayed properly. (You might have to reenter existing ZIP codes with leading zeros.) When you save the document in CSV format, Microsoft Excel automatically inserts the leading zeros into the text file as they appear on screen.

See Also

Help

Save As Command (File Menu)

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 4, "Managing Document Files"


Using Calculate Now

Microsoft Excel Help Contents

Q:  What happened to the Calculate Now command on the Options menu?

A:  The Calculate Now command, which was in previous versions of Microsoft Excel, is no longer a menu command. You can recalculate by choosing the Calculation command from the Options menu and choosing the Calc Now button, or you can press F9. Alternatively, you can press CTRL+= (equal sign). You can also use the Calculate Now tool on the Utility toolbar to recalculate the current document or, if the formula bar is activated, the formulas in the formula bar only.

See Also

Help

Calculation Command (Options Menu)

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 1)

Chapter 5, "Creating a Worksheet"


Displaying the Show Info window

Microsoft Excel Help Contents

Q:  What happened to the Show Info command on the Window menu?

A:  The Show Info command, which was in previous versions of Microsoft Excel, is no longer a menu command. You can still display the Info window by choosing the Workspace command from the Options menu and selecting the Info Window check box. The Info window will then be displayed until you either clear the Info Window check box, close the Info window, or quit Microsoft Excel.

See Also

Help

Workspace Command (Options Menu)

Answers to Common Questions

When You Have a Question

Types of Product Support

User's Guide (Book 2)

Chapter 4, "Customizing Microsoft Excel"