LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Simple Custom Function???

I'm trying to create a simple custom function. I'm trying to have the user
input the row and column numbers in the function (like =MYFUN(1,2)
referencing cell B1) and have it return the contents of that cell. So I
thought I would use the following.

Function MYFUN(varA, varB)
MYFUN = WorksheetFunction.Indirect(Address(varA, varB))
End Function

So then I tried simplifying it with just
MYFUN = WorksheetFunction.Address(varA, varB)
thinking it would return $B$1 but nothing.

What am I doing wrong?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Simple Custom Function??? Mike Excel Programming 0 August 17th 07 01:45 AM
How to create a simple VBA Custom Function Edmund Excel Programming 5 May 22nd 06 08:49 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"