Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Yet another basic problem

Hi,

I have a very basic question concerning the VBA code in excel. I would like
to know how can I decide into which cell does the excel enter the answer of
my function?

For example, if my function goes as follows,
function test(s+b)
test=s+b
end function

so how can i tell the program that the result of the function should be
shown automatically in cell e.g "C2"?

Regards,
Vepa

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Yet another basic problem

Vepa,
First, to write your function, you need to separate the arguments:
Public function test (arg1 as range, arg2 as range)
....etc

Then you have to enter the function and arguments in cell C2.
=test(A1,C14)

same as you do for any other Excel WS formula.

NickHK

"Vepa" wrote in message
...
Hi,

I have a very basic question concerning the VBA code in excel. I would

like
to know how can I decide into which cell does the excel enter the answer

of
my function?

For example, if my function goes as follows,
function test(s+b)
test=s+b
end function

so how can i tell the program that the result of the function should be
shown automatically in cell e.g "C2"?

Regards,
Vepa



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Yet another basic problem

So is it impossible for me to do, for example, a result table where all the
results of calculations involved in the function could be shown
automatically? With this I mean that I donĀ“t have to do everything manually
by using normal excel functions.

"NickHK" kirjoitti:

Vepa,
First, to write your function, you need to separate the arguments:
Public function test (arg1 as range, arg2 as range)
....etc

Then you have to enter the function and arguments in cell C2.
=test(A1,C14)

same as you do for any other Excel WS formula.

NickHK

"Vepa" wrote in message
...
Hi,

I have a very basic question concerning the VBA code in excel. I would

like
to know how can I decide into which cell does the excel enter the answer

of
my function?

For example, if my function goes as follows,
function test(s+b)
test=s+b
end function

so how can i tell the program that the result of the function should be
shown automatically in cell e.g "C2"?

Regards,
Vepa




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Yet another basic problem

<to do, for example, a result table

Look at the DataTable command

Or try to explain a bit more clearly what you are trying to achieve, so we
can suggest alternative ways to do that.

--
Kind regards,

Niek Otten

"Vepa" wrote in message
...
So is it impossible for me to do, for example, a result table where all
the
results of calculations involved in the function could be shown
automatically? With this I mean that I don“t have to do everything
manually
by using normal excel functions.

"NickHK" kirjoitti:

Vepa,
First, to write your function, you need to separate the arguments:
Public function test (arg1 as range, arg2 as range)
....etc

Then you have to enter the function and arguments in cell C2.
=test(A1,C14)

same as you do for any other Excel WS formula.

NickHK

"Vepa" wrote in message
...
Hi,

I have a very basic question concerning the VBA code in excel. I would

like
to know how can I decide into which cell does the excel enter the
answer

of
my function?

For example, if my function goes as follows,
function test(s+b)
test=s+b
end function

so how can i tell the program that the result of the function should be
shown automatically in cell e.g "C2"?

Regards,
Vepa






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
Basic format problem RaY Excel Discussion (Misc queries) 2 December 12th 06 02:32 PM
basic txt import problem Deljo Excel Discussion (Misc queries) 1 August 3rd 06 07:23 PM
Basic Solver Problem Sige Excel Worksheet Functions 8 February 6th 06 03:57 PM
Visual Basic Problem with Chr(34) Tom Ogilvy Excel Programming 0 August 6th 03 01:20 PM
Visual Basic Problem with Chr(34) Chip Pearson Excel Programming 0 August 6th 03 01:16 PM


All times are GMT +1. The time now is 11:28 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"