Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Change a Function

I made this function, and it works ok

Function Ark(nr)
Ark = Sheets(nr).Name
End Function

Then i can type : =Ark(2) and get the sheetname.

But the problem is that i wana do this :
=Ark(2)!B3 to get the value in sheet(2) cell B3
but i cant make it work

haw do i change the function to make it work ?

thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Change a Function

Any reason you don't want to use the indirect function something like this...

=Indirect(Ark(2) & "!B3")
--
HTH...

Jim Thomlinson


"excelent" wrote:

I made this function, and it works ok

Function Ark(nr)
Ark = Sheets(nr).Name
End Function

Then i can type : =Ark(2) and get the sheetname.

But the problem is that i wana do this :
=Ark(2)!B3 to get the value in sheet(2) cell B3
but i cant make it work

haw do i change the function to make it work ?

thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Change a Function

Yep - ges the reason course my brain lag
Think i had tryed allmost anythin else than this :-)

thanks Jim geat job

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
Change a cells value with a function Ryan H Excel Worksheet Functions 4 April 26th 10 01:31 PM
Function to Change Font Jay Excel Worksheet Functions 1 January 24th 09 09:10 PM
NOW() function that won't change Alex Mackenzie Excel Worksheet Functions 4 December 19th 08 08:16 PM
How do I Change the value in a count function from 1 to .25 n2lth Excel Worksheet Functions 2 June 13th 06 03:49 PM
Change function to macro Brian Excel Programming 2 March 2nd 05 11:29 PM


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