S
Stevie D
Hi, I'm trying to teach my self how to write functions in Excel VBA.
In a new workbook I've opened the VBA editor (ALT + F11)
After double clicking Sheet 1 in Project Explorer I've entered the following
code:
Function Multiply(a, b)
Multiply = a * b
End Function
After switching to Sheet 1 in the workbook and in cell A1 entering:
=Multiply(3,4)
I am getting #NAME? returned instead of 12.
Obviously the function is not being recognised. Can anyone please explain
what I'm doing wrong?
In a new workbook I've opened the VBA editor (ALT + F11)
After double clicking Sheet 1 in Project Explorer I've entered the following
code:
Function Multiply(a, b)
Multiply = a * b
End Function
After switching to Sheet 1 in the workbook and in cell A1 entering:
=Multiply(3,4)
I am getting #NAME? returned instead of 12.
Obviously the function is not being recognised. Can anyone please explain
what I'm doing wrong?