Excel 4



A malicious Microsoft Excel 4.0 Macro sheet with a suspicious formula that is set as “Very Hidden” was analyzed by Trend Micro researchers. The sheet is not readily accessible via the Microsoft Excel User Interface (UI) due to a feature documented in the Microsoft website that allows users to hide sheets. Supports the use of VBA projects and Excel 4.0 macro sheets (.xlm). Excel 97-2003 Add-In.xla. The Excel 97-2003 Add-In, a supplemental program that is designed to run additional code. Supports the use of VBA projects. Excel 4.0 Workbook.xlw. An Excel 4.0 file format that saves only worksheets, chart sheets, and macro sheets.

-->

Runs a Microsoft Excel 4.0 macro function and then returns the result of the function. The return type depends on the function.

Syntax

expression.ExecuteExcel4Macro (String)

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData typeDescription
StringRequiredStringA Microsoft Excel 4.0 macro language function without the equal sign. All references must be given as R1C1 strings. If String contains embedded double quotation marks, you must double them.
For example, to run the macro function =MID('sometext',1,4), String would have to be 'MID('sometext',1,4)'.

Return value

Variant

Remarks

The Microsoft Excel 4.0 macro isn't evaluated in the context of the current workbook or sheet. This means that any references should be external and should specify an explicit workbook name. For example, to run the Microsoft Excel 4.0 macro 'My_Macro' in Book1 you must use 'Book1!My_Macro()'. If you don't specify the workbook name, this method fails.

Excel

Example

Excel 4

This example runs the GET.CELL(42) macro function on cell C3 on Sheet1 and then displays the result in a message box. The GET.CELL(42) macro function returns the horizontal distance from the left edge of the active window to the left edge of the active cell. This macro function has no direct Visual Basic equivalent.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

Enter a Percentage | Percentage of Total | Increase by Percentage | Percentage Change

Calculating percentages in Excel is easy. Percentage simply means 'out of 100', so 72% is '72 out of 100' and 4% is '4 out of 100', etc.

Enter a Percentage

To enter a percentage in Excel, execute the following steps.

Excel

1. First, enter a decimal number.

2. On the Home tab, in the Number group, click the percentage symbol to apply a Percentage format.

Result.

Note: to change the percentage in cell A1, simply select cell A1 and type a new percentage (do not type a decimal number).

Percentage of Total

To calculate the percentage of a total in Excel, execute the following steps.

1. Enter the formula shown below. This formula divides the value in cell A1 by the value in cell B1. Simply use the forward slash (/) as the division operator. Don't forget, always start a formula with an equal sign (=).

2. On the Home tab, in the Number group, click the percentage symbol to apply a Percentage format.

Result.

3. On the Home tab, in the Number group, click the Increase Decimal button once.

Result.

Note: Excel always uses the underlying precise value in calculations, regardless of how many decimals you choose to display.

Increase by Percentage

To increase a number by a percentage in Excel, execute the following steps.

1. Enter a number in cell A1. Enter a decimal number (0.2) in cell B1 and apply a Percentage format.

2. To increase the number in cell A1 by 20%, multiply the number by 1.2 (1+0.2). The formula below does the trick.

Note: Excel uses a default order in which calculations occur. If a part of the formula is in parentheses, that part will be calculated first.

3. To decrease a number by a percentage, simply change the plus sign to a minus sign.

Percentage Change

To calculate the percentage change between two numbers in Excel, execute the following steps.

Excel 400 Error

1. Enter an old number in cell A1 and a new number in cell B1.

2. First, calculate the difference between new and old.

3. Next, divide this result by the old number in cell A1.

Note: Excel uses a default order in which calculations occur. If a part of the formula is in parentheses, that part will be calculated first.

4. On the Home tab, in the Number group, click the percentage symbol to apply a Percentage format.

Excel 4.0 Macro

Result.

5. The (New-Old)/Old formula always works.

Excel 4.0 Function Stored In Defined Names

Note: visit our page about the percent change formula for a practical example.