Computing.Net > Forums > Office Software > Assigning a function to excel cell

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Assigning a function to excel cell

Reply to Message Icon

Name: rohnds
Date: February 17, 2009 at 20:59:48 Pacific
OS: Windows XP
Subcategory: Microsoft Office
Comment:


I am trying to assign a user defined VB function to excel cell.

I wrote a s simple function called testy() in VB editor that returned a number.



Function testy() As Single
testy = 2.4
End Function

But when I assign excel with thus function like this,
=testy()

I get a cell error #NAME?


What I am doing wrong.



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: February 18, 2009 at 06:28:29 Pacific
Reply:

It works for me...

Where did you store it?

UDF's need to be stored in a regular module, not in a sheet module or in the ThisWorkbook module.


0
Reply to Message Icon

Related Posts

See More


IIF Statement Access Repo... Extract cell reference fr...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Assigning a function to excel cell

assign a shortcuts to a document www.computing.net/answers/office/assign-a-shortcuts-to-a-document/2847.html

Adding more #'s to Excel cells www.computing.net/answers/office/adding-more-s-to-excel-cells/6080.html

Exporting to Excel www.computing.net/answers/office/exporting-to-excel/9348.html