+ Reply to Thread
Results 1 to 9 of 9

Index/Match or Vlookup for retrieving data from rows?

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Index/Match or Vlookup for retrieving data from rows?

    Hi,

    I've posted here once before and received great advice and help so I thought I'd come back and give it another shot. I have a table of five years of hourly data for five variables, including LOAD. I want a table of the all entries where the LOAD variable is greater than or equal to 800. So for example, if I had

    LOAD A B C D
    200 2 3 4 5
    600 3 4 5 6
    800 2 4 5 6
    900 3 4 5 6

    it would return

    800 2 4 5 6
    900 3 4 5 6

    How would I go about doing this? Any advice would be appreciated. Thanks!

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Index/Match or Vlookup for retrieving data from rows?

    You can apply a filter to the data to just show what you need.
    Select Column A and under the Home tab choose Sort&Filter then Filter. An arrow will appear in A1 and you can then apply a filter to just show results >=800.

    Hope this helps.
    Say thanks, click *

  3. #3
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Index/Match or Vlookup for retrieving data from rows?

    awcwa, am I missing something here, or.... could you not just use the filter on the LOAD column?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  4. #4
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Index/Match or Vlookup for retrieving data from rows?

    While that would work, I was hoping for a more dynamic solution, because I want to be able to change the 800 value at will rather than just sorting the data manually.

  5. #5
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Index/Match or Vlookup for retrieving data from rows?

    Only looking at the data in your example, the easiest/quickest way to see this is to turn your data into a data table select only one cell in the range and go to the inset tab and click Table. Then filter the data for Greater than or equal to 800 or any way you want. If you need to keep that data on a separate sheet just copy and paste it from the table.

  6. #6
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Index/Match or Vlookup for retrieving data from rows?

    you could use an =if(x>=800, vlookup,x,range,n,0) type formula but the table filters are much faster and less complicated.

  7. #7
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Index/Match or Vlookup for retrieving data from rows?

    Indeed, the table filters are much easier if I was working with only one example, but I will be making a lot of changes to inputs and will be dealing with multiple datasets so I would prefer a formula. If I were to use the formula you provided, what would I look up for vlookup? I thought vlookup only returned values less than or equal to x.

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Index/Match or Vlookup for retrieving data from rows?

    Hi awcwa

    Assuming your data is in A1:E5
    Try the following, copy across and down.
    For Excel 2010:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Excel 2007<
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Kevin UK; 03-05-2013 at 01:25 PM. Reason: Missed cell locations
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  9. #9
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Index/Match or Vlookup for retrieving data from rows?

    If you want to quickly change the variable and data try the attached

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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