+ Reply to Thread
Results 1 to 7 of 7

Order History Sheet: Lookup all sheets in the workbook

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Order History Sheet: Lookup all sheets in the workbook

    Hey!

    Ran in to a bit of a problem with finding information from multiple sheets in the same workbook.

    PREFACE
    Every month we have an order sheet that's generated specifically by the store for that particular month. That sheet is sent to me for record keeping purposes which I aggregate into one workbook while renaming the sheet name to the month it belongs to. So as you can imagine the workbook has sheets for every single month of the year for up to two years.

    Each of these sheets has the exact same headers and we use named ranges for each of the columns (ITEM_NAME, QTY, TOTAL, DATE, CAT). These named ranges are the same across all sheets but the scope of the range is restricted to that particular sheet. So that way, Sheet1, Sheet2, Sheet3 can all have the same named ranges.

    REQUIREMENT
    I need a sheet at the start of the workbook, where all I have to do is type in the item name and it retrieves the corresponding data from across all the sheets in the workbook (there can be multiple instances within the same sheet). It must present the data based on the most recent month to the oldest month and also order it from the last row to the top row.

    EX:

    Sheets Present: Aug, Sep, Oct
    The data should be presented in the order of:
    Oct: Last row to first row -> Sep: Last row to first row -> Aug: Last row to first row -> and so on.

    Since new sheets are added every month, the formulas need to be able to pick that up (maybe from a helper sheet / column) and lookup the values accordingly.


    I've attached a sample sheet which should make it easier. Thanks for any help.

    Hope this can be achieved with just formulas, but in the event it cannot, then VBA is ok
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Order History Sheet: Lookup all sheets in the workbook

    Here's one version I've tested:

    Please Login or Register  to view this content.
    A non VBA version is certainly possible, but you'd need to incorporate a helper sheet and update it with new sheet names as you add them.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    09-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Order History Sheet: Lookup all sheets in the workbook

    Wow that's awesome. Thank you.

    Couple of questions
    # I wasn't able to figure out how you targeted the specific row in the FIND Sheet to output the value.
    # If I Input the same name again, the value repeat. Is there any way to keep that from happening? As in clear the results and then update them again?
    # Lastly is there any way to do this using Named Ranges instead of addressing the columns directly? The columns in my actual sheet are not contiguous and there could also be an addition of columns in the newer sheets in between existing columns that will cause an issue while retrieving the data if the columns are absolute.

  4. #4
    Registered User
    Join Date
    09-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Order History Sheet: Lookup all sheets in the workbook

    Oh and one more thing, I'd like to also be able to restrict the entries to the ones that have a POSITIVE Price. Anything that is negative (like -10) is left out.

    Thanks


    BTW - If I had to do it using formulas, then the helper sheet will need one column for every sheet right? A list for every sheet which is then consolidated in to the main sheet?
    Last edited by LEEPRIESTENATOR; 08-13-2015 at 07:07 PM.

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Order History Sheet: Lookup all sheets in the workbook

    With a helper sheet I'd use INDEX(...SMALL(IF to pull maybe 100 rows from each sheet, in blocks one after another in a single column in backwards order.

    A second INDEX(...SMALL(IF would be used to pull from this contiguous stream all the rows that were populated with relevant data, also reversed.

    Here's a version I made myself with non-contiguous columns, dynamically pulling a single variable.
    Attached Files Attached Files

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Order History Sheet: Lookup all sheets in the workbook

    Whoops. I zigged when I should have zagged and got backwards backwards.

    Let's try this again.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-10-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Order History Sheet: Lookup all sheets in the workbook

    Hahaha... Epic Title!

    This stuff is insane. I'm going to be staring at it all night trying to figure it out

    Thank you very much


    I'd like to explore the VBA approach if it's ok with you as it seems a lot less resource intensive.

    # Need a way to ensure that the latest order history is always at the top (Sheets can be named in the MMM-YYYY format (Aug-2015) or mm-yyyy format (08-2015), if that's what is needed for VBA to ensure it goes through the sheets correctly. I don't know if arranging the sheets in order will help with that, but if does, then that's not a problem to do. A helper sheet if that makes it easy is also cool.

    # Reference "Named Ranges" instead of columns as the newer "data sheets" can have the columns mixed up (not very likely, but it could happen if the store decides to add additional product data to the sheets). Also my actual sheet will not be retrieving entries from contiguous columns in the "data sheets" (Ex: ColB, ColD, ColG - you get the idea)

    # If Cell
    F1 = "ALL" then it picks up all the data,
    F1 = "DEBITS" then only negative values,
    F1 = "CREDITS" only positive values

    # Clear the results if the input field is cleared

+ 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. [SOLVED] History of save process in specific sheet for the active workbook
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2015, 04:39 AM
  2. Sorting workbook sheets in custom order
    By Shurov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2014, 04:32 PM
  3. [SOLVED] Merge many sheets into one, re-order cols, include sheet name on merged sheet rows
    By EXLwiz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-11-2014, 02:48 AM
  4. History Sheet of Shared Workbook - Date Format
    By Linraen7 in forum Excel General
    Replies: 0
    Last Post: 07-31-2012, 04:08 AM
  5. [SOLVED] Tracking inventory order history
    By rjez in forum Excel General
    Replies: 1
    Last Post: 07-13-2006, 07:40 AM
  6. HOW DO I CHANGE THE ORDER OF THE SHEETS IN EXCEL WORKBOOK?
    By joanbaer in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-05-2005, 05:05 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