Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default sub or function argument

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default sub or function argument

Try

=testfunction(A1)

Function TestFunction(C)
TestFunction = C
End Function

?T() is already a built-in function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default sub or function argument

thanks Jacob, but this will have a result of 12, not A1 as mentioned earlier.
the result should be the argument itself not the passing value.

"Jacob Skaria" wrote:

Try

=testfunction(A1)

Function TestFunction(C)
TestFunction = C
End Function

?T() is already a built-in function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default sub or function argument

how about

Function TestFunction(C)
TestFunction = C.Address
End Function


"Jerry" wrote in message
...
thanks Jacob, but this will have a result of 12, not A1 as mentioned
earlier.
the result should be the argument itself not the passing value.

"Jacob Skaria" wrote:

Try

=testfunction(A1)

Function TestFunction(C)
TestFunction = C
End Function

?T() is already a built-in function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default sub or function argument

Try the below

Function TestFunction(c As Range)
TestFunction = c.Address(False, False)
End Function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

thanks Jacob, but this will have a result of 12, not A1 as mentioned earlier.
the result should be the argument itself not the passing value.

"Jacob Skaria" wrote:

Try

=testfunction(A1)

Function TestFunction(C)
TestFunction = C
End Function

?T() is already a built-in function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default sub or function argument

Patrick/Jacob

Thats Superb! thanks men!

regards

"Jacob Skaria" wrote:

Try the below

Function TestFunction(c As Range)
TestFunction = c.Address(False, False)
End Function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

thanks Jacob, but this will have a result of 12, not A1 as mentioned earlier.
the result should be the argument itself not the passing value.

"Jacob Skaria" wrote:

Try

=testfunction(A1)

Function TestFunction(C)
TestFunction = C
End Function

?T() is already a built-in function

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

Hi All,

How can I access the argument in a function?

Example :

Let A1=12

function t(C)
**Codes????***
end function

B1=t(A1)

this function should have result of A1 not 12

thanks

Reply
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
Text Function 2nd argument Gene Excel Worksheet Functions 10 November 8th 08 11:42 PM
Need Function Argument pasekm Excel Worksheet Functions 4 March 18th 06 11:14 PM
Function (array argument, range argument, string argument) vba Witek[_2_] Excel Programming 3 April 24th 05 03:12 PM
Function Argument Chip Pearson Excel Programming 1 September 1st 04 07:05 PM
VBA - Passing a FUNCTION as an Argument James B Excel Programming 3 February 18th 04 03:42 PM


All times are GMT +1. The time now is 04:31 PM.

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

About Us

"It's about Microsoft Excel"