+ Reply to Thread
Results 1 to 14 of 14

INDEX MATCH with dates in a ROW

  1. #1
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    INDEX MATCH with dates in a ROW

    I am trying to use INDEX MATCH to pull data from Sheet2 into Sheet1 based upon the selected items in 2 combo boxes and the date (mm/dd/yy) in each column. I think I'm close but can't get it to pull in the data. Any ideas would help!

    =INDEX($B$17:$L$20,MATCH($G$1,$A$16,0),MATCH($H$1,$B$16,0))

    I've attached a sample of what I am trying to accomplish the data in the 2nd table will actually be on Sheet2

    Thank you!!
    Attached Files Attached Files
    Last edited by NBVC; 06-02-2011 at 01:06 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    Not sure I fully understand.

    Do you have multiple tables that are to be chosen from based on combo box choices? And what about the dates in B8 to K8, do those change somehow to correspond to proper dates?

    Can you post something a bit more like your actual workbook?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    Thanks for the quick reply, this is driving me crazy!

    In my sample, you see to the far right of the first table (the one I want to pull the data into) the words
    "Week 1". For each month, there will be 4 tables like this on the same worksheet, 2 side by side, Week 1 & Week 2, then below that Week 3 & Week 4, all with the dates in the month. I'm looking to find the column that has the corresponding date, i.e 3/28/11 as well as the selections chosen from the combo boxes (those won't change with the exception of adding or changing months) and bring the data from the data table from the row, i.e. "Total Ordered" into the "Total Ordered" column in my display table.
    It is just one table that I am pulling from for now. I may need to clean it up and put the data by month into separate tabs, but I think that, if I can get the simple part of it working, I should be able to handle any changes like that in the future.
    I've updated my example to include an additional week, I hope this helps. Again, thank you for your help.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    How does selecting March from the combo box come into play? is the Data on your lower table the only table in that sheet that all the looks up look in?

  5. #5
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    The month combo box needs to match up the month in this case in "A7" and "M7" with the month in the data table showing in B16. The combo boxes will change all 4 display tables to the month selected. Since I will have multiple months and divisions, there will be a table for each division for a given month, so, in this case, a table for Cars, Boats and Bikes one underneath the other. I could, if it makes it easier, just use one table and add columns to repeat the division and month all the way down. Then another table for the next month's data. Since I will only be showing about 4 months at a time and dropping off previous months, it shouldn't get too ugly.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    I don't know but I am still confused. Why does A7 and M7 display May?

    In the Data sheet, will there be a Cars March table as well as separate Cars April, Cars May, and Cars June tables? And then 4 tables for Boat, Bike, etc...?

    Maybe it's the organization of the worksheet, but I am totally not on the same page...

    I think you need to describe exactly the steps that will be taken, what will be affected and where/what data is used and why.

  7. #7
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    Sorry it's so confusing, I really appreciate you're sticking with me! As I showed in my 2nd attachment, A7 and M7 will both show May in addition to 2 other sections because there is one table on the same worksheet for each Week-Week1, Week2, Week3 and Week4. I have the combo boxes set to change both the Division and the Month on all 4 of those sections.

    I have changed my data table structure in hopes that it will be a little easier, please see attachment.

    I have the two combo boxes indexed(??) to match another cell as follows - Month selected=May, index is 5/1/2011, Division selected=Cars, index is 20.

    Thank you!!!
    Attached Files Attached Files

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    Ok, here's my best guess right now, based on your original attachment..

    See my attachment,

    I added another table in the Data! section for Boats March.

    If you change the combobox from Cars to Boats, the numbers in the first May table change accordingly.

    Is that what you are looking for?

    The formula in B9 is:

    Please Login or Register  to view this content.
    copied across,

    you can copy down too, but need to change the +1 after the first MATCH() to +3, then +4... since your lookup dates are in between the retreived values.

    Hope this gets you there...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    Wow, that's crazy! thanks so much! It's awesome to see it actually work, I'll be spending some time trying to understand the individual formulas. So if.. I wanted to make it work with my data structured in my 2nd attachment, I should just be able to alter this to pull from columns instead of the rows?

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    It all depends on exactly how the second attachment data is layed out and to be referenced. I don't see where the Cars/March is in the second table to reference in the first place.

  11. #11
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    My data is going to be in the table format in the 2nd attachment. Cars/March categories in my data are referenced by
    Division-10-Cars
    20-Boats,
    30-Bikes.
    The 10,20,30 reference the field "Division" in my data table.
    March, April, May etc. reference the field "Month" in my data table. I have my combo boxes, when selected, enter those keys (20 and 03/01/2011) in 2 cells on my worksheet and use those in my lookup function. This is how I read somewhere online how to approach this-not sure if it's correct or the best way. So, I need to reference 3 columns in my data table, Month, Division and Day. Getting closer! Your lookup from yesterday works perfectly and I now need to do another project with the data in this new column format. I am learning a lot from this experience, watching a lot of videos! I appreciate all of your help. If there is any good site you could point me to that you think is good, please let me know. You can get lost in all of the google searches.

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    That would be simpler... yes.

    See attached.

    I put your new data in Sheet2.

    Change it so that G1 results in the division number, like 20 and I am not sure why you need the Month category, it looks redundant....

    Formula in B9 is:

    =INDEX(Sheet2!$D$2:$D$24,MATCH(1,INDEX((Sheet2!$C$2:$C$24=$G$1)*(Sheet2!$B$2:$B$24=B$8),0),0))

    copied across

    Formula in B10 is

    =INDEX(Sheet2!$E$2:$E$24,MATCH(1,INDEX((Sheet2!$C$2:$C$24=$G$1)*(Sheet2!$B$2:$B$24=B$8),0),0))

    and formula in B11 is

    =INDEX(Sheet2!$F$2:$F$24,MATCH(1,INDEX((Sheet2!$C$2:$C$24=$G$1)*(Sheet2!$B$2:$B$24=B$8),0),0))

    In XL2007 and 2010 you can even use SUMIFS

    e.g.

    =SUMIFS(Sheet2!$D$2:$D$24,Sheet2!$C$2:$C$24,$G$1,Sheet2!$B$2:$B$24,B$8)

    =SUMIFS(Sheet2!$E$2:$E$24,Sheet2!$C$2:$C$24,$G$1,Sheet2!$B$2:$B$24,B$8)

    =SUMIFS(Sheet2!$F$2:$F$24,Sheet2!$C$2:$C$24,$G$1,Sheet2!$B$2:$B$24,B$8)
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-21-2006
    Posts
    36

    Re: INDEX MATCH with dates in a ROW

    Wow, that worked perfectly and I even understand it! Thank you so much,excited to continue with my project using this! Do you have any recommendations for books on Excel 2007 formulas like this?

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: INDEX MATCH with dates in a ROW

    I have not read or even looked at any books on 2007... what I know is through trial and error and these forums.

    The basic functions like SUMIFS is explained in the Excel help files and you can easily find websites that have examples of all the functions...

    for example, if you google "Sumifs function" you will get lots of hits with many examples....

    John Walkenbach's books are always a recommended source if you want books...

+ 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