+ Reply to Thread
Results 1 to 7 of 7

Vlookup statement

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    43

    Vlookup statement

    Hi I am trying to extract certain data from a main spread sheet to create a statement. Pls see attached example.
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Vlookup statement

    Quote Originally Posted by arytxer View Post
    Hi I am trying to extract certain data from a main spread sheet to create a statement. Pls see attached example.
    Please see attached file with array formula.
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Vlookup statement

    Thank you for this but it will not allow me to expand the formula to add more rows, every time I try, the cells goes blank.

    I have a massive spreadsheet with over 1000 rows, is it possible you could help me to understand why it wont allow me to add rows please thanks.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,964

    Re: Vlookup statement

    The suggested formula is an ARRAY formula...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,964

    Re: Vlookup statement

    AlKey, a quick question. In your formula...
    =IFERROR(INDEX(B$2:B$16,SMALL(IF($A$2:$A$16=$A$20,ROW($A$2:$A$16)-ROW($A$2)+1),ROWS(A$2:A2))),"")

    In the bolderd part, could that be changed to just -1?
    =IFERROR(INDEX(B$2:B$16,SMALL(IF($A$2:$A$16=$A$20,ROW($A$2:$A$16)-1),ROWS(A$2:A2))),"")

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Vlookup statement

    Quote Originally Posted by FDibbins View Post
    AlKey, a quick question. In your formula...
    =IFERROR(INDEX(B$2:B$16,SMALL(IF($A$2:$A$16=$A$20,ROW($A$2:$A$16)-ROW($A$2)+1),ROWS(A$2:A2))),"")

    In the bolderd part, could that be changed to just -1?
    =IFERROR(INDEX(B$2:B$16,SMALL(IF($A$2:$A$16=$A$20,ROW($A$2:$A$16)-1),ROWS(A$2:A2))),"")
    Well, it will make a difference if the OP decides to insert a row or two. Adding -ROW($A$2)+1) makes formula more robust.

  7. #7
    Registered User
    Join Date
    08-15-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Vlookup statement

    Thanks guys this works perfectly so far.

+ 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: 4
    Last Post: 06-01-2012, 10:05 AM
  2. Using a VLOOKUP and IF statement inside an IF statement
    By Isis3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2011, 07:04 PM
  3. If with Vlookup with And statement
    By opeyemi1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2010, 05:46 PM
  4. If with Vlookup with And statement
    By opeyemi1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2010, 02:13 PM
  5. VLOOKUP with IF statement
    By Kay in forum Excel General
    Replies: 4
    Last Post: 08-17-2005, 10:04 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