+ Reply to Thread
Results 1 to 5 of 5

LOOKUP with two criteria.

  1. #1
    Registered User
    Join Date
    01-07-2022
    Location
    Helsinki
    MS-Off Ver
    Version 2009
    Posts
    1

    LOOKUP with two criteria.

    Hi,

    I have an issue and I am trying to find an elegant way to achieve something. I hope someone could advice me here.

    So basically I have this sort of Excel sheet, which I would like to populate from another Excel sheet.

    Values X Y Z
    1
    2
    3


    So the above table I'd like to fill in from another sheet. I have the control of that other sheet, so I can also rearrange the data if that is any help.
    Right now, just so that I can explain what I want to achieve here, I have put the data in that other sheet to look like this:

    Value Col Content
    1 X something 1
    2 X something 2
    3 X something 3
    1 Y something 4
    2 Y something 5
    3 Y something 6
    1 Z something 7
    2 Z something 8
    3 Z something 9


    So based on this, I would like to populate the first table like this:

    Values X Y Z
    1 something 1 something 4 something 7
    2 something 2 something 5 something 8
    3 something 3 something 6 something 9

    So basically, I would like to look from table in another sheet a value based on Value and Col matches.

    What would be the easiest way to achieve this? Some lookup function perhaps? And would it make things easier to format the data on another sheet?

    Thanks in advance.

    Br,
    Mika
    Last edited by Glenn Kennedy; 01-07-2022 at 09:05 AM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Help to find correct way to do things in Excel

    it would make more sense to upload your workbook - see big yellow banner - manually put your expected output into a sheet.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Help to find correct way to do things in Excel

    You want either, Index/Match formulas or Get & Transform

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: LOOKUP with two criteria.

    Hi. Forum Rule 1 is very short. It states: "Title must briefly summarize your request."

    A GOOD thread title is the sort of thing you would use as a search term on Google*. Your chosen title would produce a squillion useless hits. In future, please take a bit more time to think of a descriptive title that would be "Google-friendly". Many people search the forum answers looking for help and your very general title wouldn't help them at all.

    Since you are a new user of this site, on this occasion, I have changed it for you.

    However, if you continue to use weak titles, you can expect to have your thread BLOCKED until you change it yourself. If that happens, to edit the thread title, open the original post, click "Edit Post" (bottom right) to access the area where you can edit your title.

    *Other search engines are available!!!

    Regards,

    Glenn.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: LOOKUP with two criteria.

    A sample file is ALWAYS preferred (yellow banner, top of page). However...

    =INDEX(Sheet1!$C$2:$C$10,MATCH(1,INDEX((Sheet1!$A$2:$A$10=$A2)*(Sheet1!$B$2:$B$10=B$1),0),0))

    copied across and dnown
    Attached Files Attached Files

+ 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. Cannot Find Correct O365 SharePoint Path For Excel VBA
    By tkrupka in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2021, 05:51 PM
  2. Replies: 6
    Last Post: 10-25-2015, 08:02 PM
  3. What is the fastest most efficient way to find and replace things in cells?
    By dbravo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2014, 04:17 PM
  4. correct function to find a correct time value
    By jekidi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-06-2013, 03:17 PM
  5. [SOLVED] How do I find and remove things from a data range?
    By theshaun in forum Excel General
    Replies: 2
    Last Post: 02-25-2013, 05:37 AM
  6. Need to find same things but with different values
    By Sabal in forum Excel General
    Replies: 1
    Last Post: 01-18-2013, 02:31 AM
  7. Correct syntax in If Then statement to make 2 things happen if condition met
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2011, 12:55 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