Take note

The default name assigned to a new macro is Macro1. However, you should always change this to a more meaningful name. If you assign a name to a macro, it must conform to these rules:

w Any macro name must begin with an alphabetical character w A macro name can be up to 255 characters long w A macro name can only contain numerical digits, alphabetic letters, and the underscore character (but not spaces or other punctuation characters).

Perform the actions that are to be recorded. These are:

♦ Open the workbook called SALESMAN.XLS

♦ Select the worksheet called weeklysales.

♦ Select the named range of cells end_month_sales (I32:I40). Note the selected range should appear in the Name box.

♦ Click the Copy button on the Standard toolbar.

♦ Select the top cell in the named range of cells sales_to_date (B32).

♦ Select Edit > Paste Special, and from the Paste Special dialog box, click Values.

♦ Select the named range of cells week_sales (C32:F40).

♦ Right-click the mouse button over the selected range and choose the menu option Clear Contents.

System Information

Workbook Name:

SALESMAN

Workheet Name:

weeklysales

System Propose:

To maintain weekly sales data for each representative, and

to calculate sales to date, the monthly bonus for each salesperson & month total

for each representative.

End of Mo nth Sales:

-

The Record Macro toolbar

es To Date to the Monthly Total

Monthly Bonus:

j

zinthly Total by the Bonus Rate

Sales To Date: VIonth No:

Each c: elj in t in a la jag a 15 earned over fium the End qf M onth S a] e s column fur the be ginning c:f each new it This cell value is incremented at the start of each new month

Sales Data:

nv-^' V ^

m if3

Bonus Rate:

3

* H

Month No:

1

\

Wpfklv

Rep Name

Click when you have finished recording the macro

EWemthiy Tata

Relative references button

Andy Bindi :Catie Misba

2

33

36

■363

I 1,823.00

722

J4U

IM

n

. K

y

180

£ 600 00

.720

Ali Amy

485

44

54

0

59

m

I 783.00

646

333-

20

56

39 ri

7

r

t 963.00

«in

Figure 2.4 Selecting the range end_month_sales in the worksheet 'weeklysales'

Figure 2.4 Selecting the range end_month_sales in the worksheet 'weeklysales'

When all the steps in the macro are complete, stop the macro recorder. To do this, click the Stop button on the Record Macro toolbar. Check the Status Bar no longer says 'Recording'. Note that it is not necessary to save the macro. The macro is now ready to be executed when required.

0 0

Post a comment