+ Reply to Thread
Results 1 to 4 of 4

Return a range from a range

  1. #1
    Forum Contributor
    Join Date
    09-05-2009
    Location
    Cologne, Germany
    MS-Off Ver
    Excel 2010
    Posts
    156

    Return a range from a range

    I am stumped so any ideas will be much appreciated. I want to return a range of data from another range as in the attached example. Column A contains the number of days before an item needs to be reordered and column B contains the appropriate stock code of each item. I expected this to be simple (it probably is but perhaps I'm making it complicated!). I want to search column A, find a value over zero and report both it and the appropriate stock code from column B and heve them appear in columns C and D ina new list that ignores all zero values. As an added twist, I would ideally like to see the list sorted from smallest to largest value. I have considered VLOOKUP and INDEX but I confess I'm getting out of my league here!
    Attached Files Attached Files
    Last edited by kborgers; 02-03-2010 at 04:00 AM.

  2. #2
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    Re: Return a range from a range

    Do you know about autofilter?
    Select the Row containing your Headers (probably Row 1, but Row 2 in your sample workbook)
    Select Data > Filter > AutoFilter then a Filter selection drop down will appear on every cell in Row 1
    Select the Days Stock filter then select Custom and "is greater than" and enter Zero.

    you will filter down to the items with Stock Qty > 0

    they won't be in ascending order, unless you sort the list first in ascending order.

    This would be the simplest method.

    Otherwise you will need a macro to place the results in another column.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Return a range from a range

    You could Advanced Filter with criteria to create the list. See this link for help on using Advanced Filter

    More help with Advanced Filter

    In the attached, I've created the list ( gray shaded cells) using advanced filter with the criteria (green shaded).
    Attached Files Attached Files
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Forum Contributor
    Join Date
    09-05-2009
    Location
    Cologne, Germany
    MS-Off Ver
    Excel 2010
    Posts
    156

    Re: Return a range from a range

    Thanks Guys. I was not familiar with advanced filtering and having looked, it does the job as well as required. I would prefer to have this information appear automatically in separate columns but beggars can't be choosers! I have not the time (although I have the will!) to start learning VBA so this is as good a workaround as I can expect. Thanks again both - much appreciated!

+ 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