+ Reply to Thread
Results 1 to 5 of 5

Link one sheet to another

  1. #1
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Link one sheet to another

    Hi,

    I attached a file that show worksheet 'Report' and worksheet 'Pivot'. Data from 'Report' is based on 'Pivot'. i used direct linking ,ie = Pivot!A5. However, when i change something in 'Pivot', the linking will be in the wrong place.

    May i know is there a better function to 'fix' the linking? FYI, in 'Report', cell A3 is the same as cell B5 in 'Pivot'. I am not sure whether the info is useful or not.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Re: Link one sheet to another

    Hi,

    Anyone out there can provide the solution? the sole "=" function required to amend everytime when a new line is added. It is not an efficient way to do the work.

    Thanks

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Link one sheet to another

    A combination of INDIRECT, ADDRESS and MATCH will do the trick.

    Enter this formula into cell B12 of the Report sheet. Then just copy it down and across.

    =INDIRECT("Pivot!" & ADDRESS(MATCH("*" & TRIM(Report!$A12) & "*",Pivot!$C:$C,0),MATCH("*" & TRIM(Report!B$8) & "*",Pivot!$4:$4,0)))


    What this does is use MATCH to find the row and column numbers, then use ADDRESS to convert those numbers into a cell address. Then Indirect takes that address and pulls the value.

  4. #4
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Re: Link one sheet to another

    Thanks for the solution, Whizbang.

    I wonder whether offset function can be used in this case because i am thinking in that direction but cant really figure out.

  5. #5
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Link one sheet to another

    I'll have to think about the OFFSET thing. I've only used that function a few times.

    Another option would be to do

    =INDIRECT("Pivot!"&ADDRESS(CELL("Row",B12)-7,CELL("Col",B12)+2))

    The difference between this and the last is that match is not used. Match gives you the ability to rearrange columns and rows in either sheet and still have the correct data display. If you don't expect to rearrange, then the formula above might be simmpler/quicker.

+ 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