ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I have had difficulty in creating user defined functions in Excel (https://www.excelbanter.com/excel-worksheet-functions/34939-i-have-had-difficulty-creating-user-defined-functions-excel.html)

MichaelG

I have had difficulty in creating user defined functions in Excel
 
I have been using the Wrox Excel VBA 200 book.

When I create a user defined function for use in Excel Workbook (ie typing
the function directly into the cell), I get an error message name #Name? when
I enter the function into a cell.

This happens even when I am copying examples directrly from the book.

Clearly I am doing something wrong but what is it

DerbyJim1978

Michael,

I had a similar problem a few weeks ago... Have you tried going into tools -
Add Ins - Analysis toolpak?

Jim

"MichaelG" wrote:

I have been using the Wrox Excel VBA 200 book.

When I create a user defined function for use in Excel Workbook (ie typing
the function directly into the cell), I get an error message name #Name? when
I enter the function into a cell.

This happens even when I am copying examples directrly from the book.

Clearly I am doing something wrong but what is it


Niek Otten

Did you type or copy the functions into a Standard Module? It should not be
in a Worksheet, Claas or any other Module

In the VB Editor: InsertModule. Enter your function there.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"MichaelG" wrote in message
...
I have been using the Wrox Excel VBA 200 book.

When I create a user defined function for use in Excel Workbook (ie typing
the function directly into the cell), I get an error message name #Name?
when
I enter the function into a cell.

This happens even when I am copying examples directrly from the book.

Clearly I am doing something wrong but what is it




MichaelG

Many thanks. That worked a treat!

Cheers

MichaelG

"Niek Otten" wrote:

Did you type or copy the functions into a Standard Module? It should not be
in a Worksheet, Claas or any other Module

In the VB Editor: InsertModule. Enter your function there.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"MichaelG" wrote in message
...
I have been using the Wrox Excel VBA 200 book.

When I create a user defined function for use in Excel Workbook (ie typing
the function directly into the cell), I get an error message name #Name?
when
I enter the function into a cell.

This happens even when I am copying examples directrly from the book.

Clearly I am doing something wrong but what is it






All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com