Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Excel function with variable


Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile: http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using Excel function with variable

Yes, using the INDIRECT function. But you need to know that this is
volatile.

Regards

Steve Dalton

"ditzafar" wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile:

http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Excel function with variable


What do you mean by indirect function.
thanks

Steve Dalton Wrote:
Yes, using the INDIRECT function. But you need to know that this is
volatile.

Regards

Steve Dalton

"ditzafar"
wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar

------------------------------------------------------------------------
ditzafar's Profile:

http://www.excelforum.com/member.php...o&userid=29475
View this thread:

http://www.excelforum.com/showthread...hreadid=497502



--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile: http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Using Excel function with variable

If you mean a User defined Function (UDF):

Function DemoSum(a As Range) As Double
DemoSum = a.Count
End Function

--
Kind regards,

Niek Otten

"ditzafar" wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile:
http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using Excel function with variable

See response in other thread

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ditzafar" wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile:

http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Excel function with variable


Sorry, but I stille didn't understand how I using excel function with
variable.
For example I want to use the function average. the recorde of this
macro looks like this
ActiveCell.FormulaR1C1 = "=AVERAGE(R[-6]C[-6]:R[3]C[-6])"
I want to replace the index of the row with variable
thanks:)

Niek Otten Wrote:
If you mean a User defined Function (UDF):

Function DemoSum(a As Range) As Double
DemoSum = a.Count
End Function

--
Kind regards,

Niek Otten

"ditzafar"
wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar

------------------------------------------------------------------------
ditzafar's Profile:
http://www.excelforum.com/member.php...o&userid=29475
View this thread:

http://www.excelforum.com/showthread...hreadid=497502



--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile: http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Using Excel function with variable

ActiveCell.FormulaR1C1 = "=AVERAGE(R[-" & VaraRowNo1 & "]C[-6]:R[" &
VarRowNo2 & "]C[-6])"

--
Kind regards,

Niek Otten

"ditzafar" wrote in
message ...

Sorry, but I stille didn't understand how I using excel function with
variable.
For example I want to use the function average. the recorde of this
macro looks like this
ActiveCell.FormulaR1C1 = "=AVERAGE(R[-6]C[-6]:R[3]C[-6])"
I want to replace the index of the row with variable
thanks:)

Niek Otten Wrote:
If you mean a User defined Function (UDF):

Function DemoSum(a As Range) As Double
DemoSum = a.Count
End Function

--
Kind regards,

Niek Otten

"ditzafar"
wrote in
message ...

Could I use excel function when I don't know the range and I need to
define it with variable.
If it possible, how I do it?
Thanks:)


--
ditzafar

------------------------------------------------------------------------
ditzafar's Profile:
http://www.excelforum.com/member.php...o&userid=29475
View this thread:

http://www.excelforum.com/showthread...hreadid=497502



--
ditzafar
------------------------------------------------------------------------
ditzafar's Profile:
http://www.excelforum.com/member.php...o&userid=29475
View this thread: http://www.excelforum.com/showthread...hreadid=497502



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
Variable Value Function Help? Jonathan Cheek[_2_] Excel Worksheet Functions 2 December 22nd 09 05:33 AM
How to graph x-variable versus y-variable in Excel ? Mojjara New Users to Excel 3 April 2nd 09 05:38 PM
Using a range variable inside a excel function Michael Excel Discussion (Misc queries) 2 November 14th 05 02:52 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Set variable to a function Dan Excel Programming 3 June 11th 04 03:09 PM


All times are GMT +1. The time now is 12:42 AM.

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"