+ Reply to Thread
Results 1 to 9 of 9

VLookup or IF issues

  1. #1
    Registered User
    Join Date
    02-02-2016
    Location
    Rouyn-Noranda (Québec)
    MS-Off Ver
    2010
    Posts
    5

    VLookup or IF issues

    Hello,
    I am trying to figure excel formulas out.
    What I would like is to put an x in a column and have the 3 cells next to it show up in another area of the sheet.

    See picture:
    I would like to put an "x" in O2 and have L2, M2 and N2 show up in A4, B4 and C4. And to be able to do that with the whole column, wherever I put the "x", the 3 colums to the right show up in A4, B4 and C4.

    Is this something that can be done with Excel Formulas?

    Thanks in advance for the help.

    ScreenHunter_107 Feb. 02 13.28.jpg

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VLookup or IF issues

    In A4, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy and paste to B4:C4.

    This will return the values in columns L:N for the first row with an x in column O.

    What did you want to happen if you have more than one x in Column O?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: VLookup or IF issues

    In A4

    =IFERROR(INDEX(L$2:L1000,SMALL(IF($O$2:$O$1000="x",ROW($A$2:$A$1000)-ROW($A$2)+1,""),ROWS($A$2:A2))),"")

    Enter with CtrL+shift+Enter

    Drag across to column C

    Drag down as many rows as required

  4. #4
    Registered User
    Join Date
    02-02-2016
    Location
    Rouyn-Noranda (Québec)
    MS-Off Ver
    2010
    Posts
    5

    Re: VLookup or IF issues

    Quote Originally Posted by Olly View Post
    In A4, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy and paste to B4:C4.

    This will return the values in columns L:N for the first row with an x in column O.

    What did you want to happen if you have more than one x in Column O?
    Well that works great. I will only have an X in only one place so I dont need it to do anything if there are two Xs.

    Thank you very much.

  5. #5
    Registered User
    Join Date
    02-02-2016
    Location
    Rouyn-Noranda (Québec)
    MS-Off Ver
    2010
    Posts
    5

    Re: VLookup or IF issues

    Quote Originally Posted by JohnTopley View Post
    In A4

    =IFERROR(INDEX(L$2:L1000,SMALL(IF($O$2:$O$1000="x",ROW($A$2:$A$1000)-ROW($A$2)+1,""),ROWS($A$2:A2))),"")

    Enter with CtrL+shift+Enter

    Drag across to column C

    Drag down as many rows as required

    Thanks for the help but the post above works fine and I tried this one and its abit over my head lol.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: VLookup or IF issues

    Sorry: misinterpreted your post!

    Mine allowed you to put multiple "x" s in column O and would list them all

  7. #7
    Registered User
    Join Date
    02-02-2016
    Location
    Rouyn-Noranda (Québec)
    MS-Off Ver
    2010
    Posts
    5

    Re: VLookup or IF issues

    Quote Originally Posted by Olly View Post
    In A4, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy and paste to B4:C4.

    This will return the values in columns L:N for the first row with an x in column O.

    What did you want to happen if you have more than one x in Column O?

    I was wondering if there was a way to just make the formula check for "x" in a certain range of colums... for example from O2 to 027?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: VLookup or IF issues

    You could change to

    =IFERROR(INDEX(L2:L27,MATCH("x",$O2:$O27,0)),"")

    Any reason for the restriction?

  9. #9
    Registered User
    Join Date
    02-02-2016
    Location
    Rouyn-Noranda (Québec)
    MS-Off Ver
    2010
    Posts
    5

    Re: VLookup or IF issues

    Quote Originally Posted by JohnTopley View Post
    You could change to

    =IFERROR(INDEX(L2:L27,MATCH("x",$O2:$O27,0)),"")

    Any reason for the restriction?

    Fantasitc! Works like a charm. Thanks Again

+ 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. Vlookup Issues
    By skatar90 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-29-2015, 11:40 AM
  2. [SOLVED] Vlookup issues
    By taflorida in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2015, 09:35 AM
  3. VLOOKUP Issues
    By AdeySFDC in forum Excel General
    Replies: 4
    Last Post: 08-29-2014, 12:54 PM
  4. [SOLVED] issues with vlookup
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-08-2014, 02:31 AM
  5. [SOLVED] VLOOKUP Issues
    By tapsmiled in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 12-14-2013, 11:01 PM
  6. Vlookup issues
    By Pablo269 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-19-2011, 04:56 PM
  7. vlookup issues
    By pittguy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2008, 05:19 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