Using cell Adress in formula
Find bottlenecks in your Excel workbooks
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Using cell Adress in formula

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Here is an example of what I am trying to do.

    I am calling a cell location in a cell. So say in A1 there is the value $B$5.

    Now I want to use this cell location ($B$5) in a formula in say cell A3.

    Any idea how this could be accomplished, (hope it is spelled out clearly!)?

    Thanks guys

  2. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Create a function in a module like below.

    Function TextRange(myrange As Range)
    TextRange = Range(myrange).Value
    End Function

    And call it in A3 like this ;

    =TextRange(A1)

    We dont need excel functions all the time. We can create ours for our specific needs.

    By the way i dont know if this could be with an internal function.


    regards
    suat
    PS: dont forget to visit TheWordExpert for VBA help and also other office applications and subscribing for monthly newsletter.


    [ This Message was edited by: smozgur on 2002-03-16 17:05 ]

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks smozgur.

    It is coming back with #name?

    Is there anything else I have to do to activate the function? I have placed what you advised in a module.

    Thanks again.

  4. #4
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    did you created a new Module in the workbook you are working on?

    ?

  5. #5
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yeah sure did.

    The function appears under Insert>function>userdefined
    but still returns #name?

  6. #6
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Check this one. It is working.

    http://abone.turk.net/3dhayat/sample.zip

    suat

  7. #7
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Peak,

    easier, Excel had an internal function

    =INDIRECT(A1)

    if A1='B5' then formula return B5 cell value.

    i told you that i didnot know if it exists

    suat


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com