215k views
1 vote
Use the VBA Editor to create a custom function named Mileage. Type the following code to create the custom function.

Function Mileage (Miles,Rate)

'Creates custom Mileage function

Mileage = Miles * Rate

1 Answer

4 votes

Final answer:

To create a custom function named Mileage in VBA, use the given code. This function multiplies the values of Miles and Rate.

Step-by-step explanation:

In VBA, a custom function can be created using the VBA Editor. To create a custom function named Mileage, you can follow the given code:

Function Mileage(Miles, Rate)
'Creates custom Mileage function
Mileage = Miles * Rate
End Function

This custom function takes two arguments, Miles and Rate. It multiplies these two values and returns the result.

User Dronik
by
7.9k points