+ Reply to Thread
Results 1 to 8 of 8

Thread: Return a value in another spreadsheet

  1. #1
    Registered User
    Join Date
    07-22-2009
    Location
    Wakefield, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Unhappy Return a value in another spreadsheet

    Hi

    I have a question...

    I currently use a rota which has dates in column A and names in column B - call this ROTA

    Then I use a tracker, where it holds all the names in column A and i want it to return the date that the name is next to in ROTA.

    In plain language this is the formula...

    if 'Joe Bloggs' from spreadsheet 'tracker', is in spreadsheet 'rota' column B, then return date in column a to spreadsheet 'tracker' column b (next to 'Joe Bloggs')

    Really hope this makes sense!!

    Please help!

    Thanks Julia

  2. #2
    "Eagle Eyed" Forum Moderator oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Work) and 2007 (Home)
    Posts
    7,130

    Re: Return a value in another spreadsheet

    Hi,

    Welcome to the forum, you need something like this in B1 of Tracker sheet

    =VLOOKUP(A1,Rota!$A$1:$B$30,2,FALSE) format this column to date or the return will be a number ie. today() is 40016
    oldchippy
    -------------


    If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    07-22-2009
    Location
    Wakefield, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Return a value in another spreadsheet

    Hiya again

    I have attached examples of what I need. The end result should return under 'date attended' in tracker.

    Thanks
    Attached Files Attached Files

  4. #4
    "Eagle Eyed" Forum Moderator oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Work) and 2007 (Home)
    Posts
    7,130

    Re: Return a value in another spreadsheet

    Hi,

    If you can move column C to the left of column A in Rota so that Joe bloggs is now column A and the date in in columnB, then you can use the vlookup

    =VLOOKUP(A2,[Rota.xls]Sheet1'!$A$2:$D$7,2,FALSE)
    oldchippy
    -------------


    If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2007
    Posts
    724

    Re: Return a value in another spreadsheet

    Oldchippy's solution is clean and simple. It's better to organize your data to make it easy for future reference.
    Having said that, if just can't move the columns then see the attached files.
    The formula written in Tracker.xls will work regardless of the order of the column placements.
    modytrane
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-22-2009
    Location
    Wakefield, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Return a value in another spreadsheet

    Thank you both Modytrane & Oldchippy. I think the formula in the tracker will work out best now I just need to work out how to apply it to my spreadsheets here!
    Thanks

  7. #7
    Registered User
    Join Date
    07-22-2009
    Location
    Wakefield, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Return a value in another spreadsheet

    Dont suppose anyone could help me break it down?

    =INDIRECT("[Rota.xls]Sheet1!A"&(MATCH(A3,'C:\Documents and Settings\Julia\Local Settings\Temporary Internet Files\Content.IE5\LVSQZ9UT\[Rota.xls]Sheet1'!$C$2:$C$7,0)+ROW($C$2)-1))

  8. #8
    Valued Forum Contributor
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2007
    Posts
    724

    Re: Return a value in another spreadsheet

    =INDIRECT("[Rota.xls]Sheet1!A"&(MATCH(A3,'C:\Documents and Settings\Julia\Local Settings\Temporary Internet Files\Content.IE5\LVSQZ9UT\[Rota.xls]Sheet1'!$C$2:$C$7,0)+ROW($C$2)-1))
    You can read up on the Indirect function under help, but here's the general idea.

    The function will allow you to reference a cell in an indirect way. So, instead of addressing a cell directly as "A4", you can write INDIRECT(A1), where "A1" contains "A4". This method allows you to build the address using a formula.
    In the formula above, first part "[ROTA.xls]Sheet1!A" builds first part of the cell address, which in this case is fixed. It includes the ROTA.xls file, Sheet1 and column A. The part after & calculates the Row number using a MATCH function.

    In the MATCH fucntion you are trying to find a match for "A3" in the Array located in Sheet1 of ROTA.xls at $C$2:$C$7. The match function gives you relative location within the array. So let's say you find a match at third location in the array. So you would get a result of 3, but since the array starts in row 2, you want to add 1 to get the actual row number, which is 4.
    You can simply rewrite the formula as follows:

    =INDIRECT("[Rota.xls]Sheet1!A"&(MATCH(A3,[Rota.xls]Sheet1!$C$2:$C$7,0)+1))
    Hope this helps.
    modytrane

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0