+ Reply to Thread
Results 1 to 5 of 5

Can I reference a cell based on value in other cell?

  1. #1
    Registered User
    Join Date
    03-09-2006
    Posts
    4

    Can I reference a cell based on value in other cell?

    Hi there,


    So for instance I have data in A1:A:10
    I type a number in cell B1, say 3

    Now I want cell C1 to contain A3+5

    but when I chance B1 to 4, C1 should change to A4+5

    in other words the fomulea in C1 has a reference that depends on another cell (a pointer if you wish).

    Thanks heaps!
    Bas

  2. #2
    Guest

    Re: Can I reference a cell based on value in other cell?

    Hi

    Try something like this in C1:
    =INDIRECT("A"&B1)+5

    Andy.

    "bvandijk" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi there,
    >
    >
    > So for instance I have data in A1:A:10
    > I type a number in cell B1, say 3
    >
    > Now I want cell C1 to contain A3+5
    >
    > but when I chance B1 to 4, C1 should change to A4+5
    >
    > in other words the fomulea in C1 has a reference that depends on
    > another cell (a pointer if you wish).
    >
    > Thanks heaps!
    > Bas
    >
    >
    > --
    > bvandijk
    > ------------------------------------------------------------------------
    > bvandijk's Profile:
    > http://www.excelforum.com/member.php...o&userid=32300
    > View this thread: http://www.excelforum.com/showthread...hreadid=520570
    >




  3. #3
    Registered User
    Join Date
    03-09-2006
    Posts
    4
    Great ! it works.

  4. #4
    Registered User
    Join Date
    03-09-2006
    Posts
    4

    referencing; additional problem

    It works great but I have another problem now: when the target cell is empty, the formuleau returns '0' instead of an empty cell.

    Any hints on that?

    Thanks!
    Bas

  5. #5
    Guest

    Re: Can I reference a cell based on value in other cell?

    Here you go:

    =IF(INDIRECT("A"&B1)=0,"",INDIRECT("A"&B1))

    Andy.

    "bvandijk" <[email protected]> wrote in
    message news:[email protected]...
    >
    > It works great but I have another problem now: when the target cell is
    > empty, the formuleau returns '0' instead of an empty cell.
    >
    > Any hints on that?
    >
    > Thanks!
    > Bas
    >
    >
    > --
    > bvandijk
    > ------------------------------------------------------------------------
    > bvandijk's Profile:
    > http://www.excelforum.com/member.php...o&userid=32300
    > View this thread: http://www.excelforum.com/showthread...hreadid=520570
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1