+ Reply to Thread
Results 1 to 16 of 16

Offset in combination with match and Vlookup

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Offset in combination with match and Vlookup

    Hello all,

    I'm trying to find out how to use offset in combination with match and vlookup. Well I think I have to use Offset to find the value ( cell with time in it).

    I have in my workbook 3 sheets: Sheet1, Sheet2 and Agents.

    In 'Sheet2' every week I upload a report with persons and every person has a certain amount of time behind their name.
    In 'Sheet1' I want to get (load) the data: the person and time from 'Sheet2'.
    In 'Agents' I only match the names. That's because the names in the report I upload in 'Sheet2' have a different lay-out then the ones I use.

    The matching and to get the names correct in 'Sheet1' Is no problem. Though I get stuck with the cells where the time is placed in the report I upload in 'Sheet2'.
    The persons are in Column C ( C7, C26, C45, C64 etc) but the value I also need to get is not in line behind the names. It's In the 7th row under the name and in Column L.

    Example:


    Wiebe (C7) time ( L14)
    Gary (C26 time ( L33)
    Kay (C45) time ( L52)

    What I use to match the names and get data is this formula.

    =INDEX(Sheet2!$A:$L;MATCH(VLOOKUP(Sheet1!$A2;Agents!$A:$E;5;0);Sheet2!$C:$C;0);MATCH(B$1;Sheet2!$1:$1;0))

    Is it possible to use Offset ( or something different) in this formula to also get the cells with the time ( matching with the right person)
    Last edited by Wiebe; 04-24-2014 at 03:51 PM. Reason: Dutch names in formula ( Blad instead of sheet)

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Offset in combination with match and Vlookup

    I suppose yo want to count the time of each member.

    Maybe it also can be done, with an pivot table on sheet 2.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Thanks Oeldere,

    Isn't a pivot causing any problems with the follow up in the workbook? It's quite a large file and after I have the data in 'Sheet1' I'm loading the data in another sheet (together with other data) and use a macro to write all the data to the different persons sheets. In the workbook I can load all the other reports without pivots in the different sheets, only problem is that the value in this specific report is placed different.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Offset in combination with match and Vlookup

    I think you get better help if you add an excel file, without confidential information on the forum.

    Also add the desired result in the workbook.

  5. #5
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Thanks,

    Will make a new excel file so there's no confidential information in it.

  6. #6
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Here's a simple version of the excel file. The report I upload every week is in 'Sheet1' ( cut off to 2 persons) . I gave the cells I want to load from 'Sheet1' to 'Sheet2' a red color. After that I load the data in the 'uren' sheet, but thats no problem.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Offset in combination with match and Vlookup

    Another approach (VBA)

    run this macro and you get the rows you need.

    The code needs to be cleaned up (but it gives you the idea).

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Thanks oeldere!

    Will test it today and let you know.

  9. #9
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Offset in combination with match and Vlookup

    Hello Wiebie you could also try
    =INDEX(Sheet1!L:L,MATCH("*"&LEFT($A2,FIND(" ",$A2)-1),Sheet1!C:C,0)+7)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  10. #10
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Thanks Hemesh!

    Will try that one also. Given my knowledge that solution looks a bit less complex.

  11. #11
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Quote Originally Posted by hemesh View Post
    Hello Wiebie you could also try
    =INDEX(Sheet1!L:L,MATCH("*"&LEFT($A2,FIND(" ",$A2)-1),Sheet1!C:C,0)+7)
    This seems to work great! only problem is that some first names are identical. Is it possible to combine the "Agents' sheet in this formula?
    In that sheet I made a column with the names of the report (E) and the names I need to use (A)

    Should be the bold part of the formula?

    =INDEX(Sheet2!$A:$L;MATCH(VLOOKUP(Sheet1!$A2;Agents!$A:$E;5;0);Sheet2!$C:$C;0);MATCH(B$1;Sheet2!$1:$1;0))

  12. #12
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Offset in combination with match and Vlookup

    try this one
    =INDEX(Sheet1!$L:$L,MATCH(VLOOKUP(Sheet2!$A2,Agents!$A:$E,5,0),Sheet1!$C:$C,0)+7)

  13. #13
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Brilliant hemesh! It works like a charm.

    Thanks Oeldere en hemesh for the help

  14. #14
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Offset in combination with match and Vlookup

    you could also use
    =INDEX(Sheet1!$A:$Z,MATCH(VLOOKUP(Sheet2!$A2,Agents!$A:$E,5,0),Sheet1!$C:$C,0)+7,MATCH(Sheet2!B$1,Sheet1!$1:$1,0)-2)
    -2 because your result is 2 columns to the left of match found.

  15. #15
    Registered User
    Join Date
    04-17-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Offset in combination with match and Vlookup

    Thanks! I will write down that formula also.

  16. #16
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Offset in combination with match and Vlookup

    You are welcome and thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 07-13-2011, 09:22 AM
  2. Replies: 3
    Last Post: 09-23-2009, 06:27 AM
  3. Problem with combination of Product, Offset, Address, Match
    By espresso1981q in forum Excel General
    Replies: 2
    Last Post: 05-10-2009, 07:30 AM
  4. Match Offset combination
    By BRISBANEBOB in forum Excel General
    Replies: 4
    Last Post: 04-06-2009, 02:09 AM
  5. Replies: 4
    Last Post: 03-31-2008, 12:28 PM

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