+ Reply to Thread
Results 1 to 11 of 11

Vlookup-Match&offset help

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    90

    Vlookup-Match&offset help

    Hello,

    I am trying to create a list of value under columns J,K,L where the data will be taken from columns A and B.

    Attached the workbook:
    First example "bob" should have the value 15, 13 and 45 (highlighted in red) - taking the values from the aaa ("B7"), bbb ("B9"), ccc ("B11") under the name "bob"

    Similarly "John" should show 675 in cell "J10", 65 in cell "K10 and 75 in cell "L10".

    Any idea how to do this? I tried to work the "Match" and "offset" commands but no luck. This is beyond my powers
    Attached Files Attached Files
    Last edited by tsioumiou; 01-21-2015 at 10:42 AM.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup-Match&offset help

    You don't have to think too far ahead in terms of offset. Instead, dictate the offsets upfront visually and you'll see how it works together.

    Please Login or Register  to view this content.
    As long as your ranges are identical in length, their placement is irrelevant.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup-Match&offset help

    Explained another way:

    Imagine you had names every 3 rows in A1:A48, ID's every 3 rows from B2:B49, and a score every 3 rows from C3:C50.

    =SUMPRODUCT((A1:A48=X)*(B2:B49=Y)*(C3:C50))

    Each range is from the first occurence, to the last occurence. As long as they are all the same, nothing else matters.

  4. #4
    Registered User
    Join Date
    05-13-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    90

    Re: Vlookup-Match&offset help

    Thanks for the reply daffodil. Unfortunately the ranges are not the same (similar random format like I have)... and over 200+ names on the list so I dont think your solution will help much

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup-Match&offset help

    How about you just use VBA instead?

    This short subroutine will make quick work of this for you.

    Please Login or Register  to view this content.
    Expand the I9:I13 range as needed.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Vlookup-Match&offset help

    If you prefer to do it in terms of OFFSET / MATCH:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I picked 9 as the row height for the OFFSET because it would fit the longest range of data in column A. If you need something more dynamic that computes that height it will take a little more work.

    BTW: are the order of the names in the table always going to be in the same order as the data in column A and will they be unique?

    Edit: The more I think about it the row height shouldn't be problematic. The MATCHs for aaa, bbb, ccc...will always return the first occurrence no matter how many of them are in the OFFSET range. Just set the height to the largest number of rows between names you would anticipate.
    Last edited by FlameRetired; 01-19-2015 at 09:08 PM. Reason: afterthoughts

  7. #7
    Registered User
    Join Date
    05-13-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    90

    Re: Vlookup-Match&offset help

    I tried the code but the values do not fill on columns J, K, L . Would you be able to attach me the workbook maybe?

  8. #8
    Registered User
    Join Date
    05-13-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    90

    Re: Vlookup-Match&offset help

    FlameRetired thanks for the reply. This results in #N/A for me.

    The order of the names will be the same most of the times (1 after the other) and unique. However the spaces between them in column A might be different.

    When you ask me to set the height from what part of the formula will that be? How do I increase it?

  9. #9
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Vlookup-Match&offset help

    Works fine for me.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-13-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    90

    Re: Vlookup-Match&offset help

    This is working daffodil. You made it look easy

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Vlookup-Match&offset help

    Quote Originally Posted by tsioumiou View Post
    FlameRetired thanks for the reply. This results in #N/A for me.

    The order of the names will be the same most of the times (1 after the other) and unique. However the spaces between them in column A might be different.

    When you ask me to set the height from what part of the formula will that be? How do I increase it?
    Change the height in the OFFSET function part from 9 to something arbitrarily large.....larger than the largest number of rows between names that you anticipate. I've tried as high as 50 and it works for all the data supplied. 9 is the bare minimum for the date supplied.

    My bad; apologies.

+ 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. [SOLVED] Offset and Match Help? or Vlookup?
    By mrr2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 10:04 AM
  2. Replies: 2
    Last Post: 03-16-2012, 12:03 PM
  3. Offset match (vlookup backwards)
    By TWR88 in forum Excel General
    Replies: 1
    Last Post: 02-22-2012, 08:38 AM
  4. is it vlookup, match, offset?
    By ADiscrete1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-24-2006, 07:40 PM
  5. VLOOKUP, OFFSET, MATCH PROBLEM, HELP?
    By Steve in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2005, 06:06 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