+ Reply to Thread
Results 1 to 14 of 14

Excel 2007 : multiple indentical lookups required from table array

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Unhappy multiple indentical lookups required from table array

    I am need of assistance with scenario I am trying to create in Excel 2007. I am a bit familiar with the vlookup command but I need to do something that is a little more robust.
    I have a table with approx. 8 columns and 35 or so rows. The data in this table will change daily except for column A which will have same character strings daily but will be in different row locations of column A daily. To clarify: imagine the names of colors being in Column A (Red, Blue, Green, Yellow, etc.). As stated, these colors will remain constant as far as the table is concerned but their daily location will change in Column A (ie. Red could be in A1 one day and A4 the next). This of course is where vlookup comes in, whereby it will search the column and report the values of the corresponding columns chosen for the respective color found.
    Now here comes the problem. I am going to have occasions where the Column A value that I am looking for is going to appear 2 or 3 times in Column A at various locations. (ie. Column A values: Black, Red, Blue, Yellow, Red, Yellow, Green, Black, Red).
    What I am needing to do is locate the first required value (ie. Red) and report the other column values that correspond to the column/row that the first Red value was found. Then another cell containing another lookup for the second occurence of this same value (ie. Red) and the corresponding values from the columns where this value is found.
    I am not familiar with ganging multiple arguments and whether or not you can use a vlookup command in conjunction with say a lookup or find command.

    thank you in advance for your assistance.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    Hi tornado26tiger,

    Welcome to the forum.

    Seems to be interesting query, please post the sample file. click on "Go Advanced" while replying and then look for paper clip icon to attach. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Okay.....hopefully the attachment will give you some idea as to what I am up against.
    Sheet 1 will be a typical copy and paste scenario from another work data base.

    Sheet 2 - I then rearrange Sheet 1 so that the vlookup information is in the first column where I need it. As you can see, I have highlighted a couple of the numbers that repeat themselves in this first column but the numbers that are associated with them vary in the corresponding columns.
    I have done a few vlookup queries for one of the entries (far top right of Sheet 2 highlighted in orange).
    Now the problem I have is that this works for the first entry but how do I have Excel locate the second and third entries and deliver the corresponding information from those location's columns via vlookup or some other method.

    thank you in advance for your assistance.
    Attached Files Attached Files

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    Hi tornado,

    See the attached file.. and let me know if this can help.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Hi DILIPandey,
    It appears on the surface that you certainly have established what I am looking for. Obviously complicated and may be beyond my capabilities. Can you explain what exactly the formula is and does and how you arrive at the result?
    I tried changing the number in the formula after ROW in an attempt to source other data from other columns, however that didn't work. You've used columns 2, 6 and 13 as I did in my vlookup example, but other columns may be required to be reported.

    Thank you very much for your assistance.

    Should I start another thread for another query or can you help me with it too?

    Sincerely
    tornado26tiger

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    Thanks tornado for encouragement.

    What formula is / does:- For index function to work, for matching rows with "69598301", it has considered all the rows which has this number in Column A and then I am considering one by one row starting from smallest row # first. So basis said logic, row comes as 18, 40, 44 and hence I am picking one by one for each calculation / extraction - which is triggered by row($A1) in first , then row($A2) ... in last part of the formula.

    I ignored the number(2,6,13) in the formula as your were also using this in your earlier formula and I thought let you go your way.. when you change this,press Ctrl + Shift + Enter instead of just pressing Enter as this is an array formula. Alternatively, this exercise can be eradicated if you can supply the column names on top where we can use Match function to determine their occurrence and these number (2,6,13.... etc) then can be automatically picked up.

    I hope this helps.

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Hi DILIPandey,
    this is looking pretty promising. I had created Sheet 2 by transferring and rearranging Sheet 1's information. But that was only for the purpose of using vlookup which requires the column 1 information to be in that position for lookup. If you look at Sheet 1 you will see that it essentially has the same information except the column names are there. So what would the formula look like if you were to use the information on Sheet 1 and use the column names to, as you say "eradicate this exercise"?
    Also I may want to use your formula on one sheet (ie. Sheet 3) but the data to be searched will be on Sheet 1 (as per my request above). What will that formula look like if I am reporting the result on a different page than where the table of data is located?

    Thank you very much for your assistance!

    tornado26tiger

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    Hi Tornado,

    See the attached file where I have fetched the results into new sheet and also now you don't need to enter column number manually
    Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Hi DILIPandey,

    Awesome!!!!!!! Well, awesome for you. I still have to understand it and hopefully I can make it work for myself. I tried your previous version a couple of times. I must be doing something wrong as I couldn't get it to report back like you did.

    3 Questions for you.
    1) What does the SMALL do in the whole function process?
    2) What does the -2 do (ROW($A1))-2) do as well?
    3) The table array (Sheet 1) is going to change with respect to size (rows only) daily put the other sheets that I am going to report the data to are going to remain fixed. Can I expand the table array (currently A3....Q46) to something that will ensure I capture the information (say A3......Q150) without disrupting the function even though there could be many empty rows within this size of array?

    I get most of the other syntax as far as sourcing the column that I am looking for the matches in and the table arry that it is searching through etc. Just going to have to play with it a bit more and get some results.

    Once again I thank you immensely for your assistance with this. This is going to save me a lot of time in the future once I get the proper spreadsheet built.

    Sincerely
    tornado

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    You are welcome Tornado....

    1) Small function picks up the smaller number one by one from rows a1, a2, a3... as you drag the formula down.
    2) -2 is there to adjust the row numbering to start from 1 always because your data starts from row3.. hence row3-2 = row1 = 1
    3) If your data size increases or decreases like this, you can define a name (dynamic name) and then you can use the same in place of A3:Q46 and that will take care of this, see the attached file and try increasing / decreasing rows in your data.

    cheers


    Let me know in case you need further help

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Ha! That is just ducky!
    Now you've created more questions.

    1) So is the answer to my question about simply expanding the search area (currently A3......Q46) to (A3....Q150) not possible with the blank cells in that size of array. Yes/No?

    2) I see you have the ColData instruction now in the function. I see by clicking on ColData in the Name Box that you have assigned the Column Names/Headings into this name. I assume this is what you meant by creating a dynamic name. However, once again, I do not know how to accomplish this.

    Thank you for your patience.

    Sincerely,
    tornado

  12. #12
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    oops.....forgot a question.

    I am assuming copy and pasting or right bottom corner auto fill is the best way to duplicate the fomula as I am going to require it in a large number of cells to return date. Yes/No?

    Thanks
    tornado

  13. #13
    Registered User
    Join Date
    02-07-2012
    Location
    Regina, Saskatchewan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: multiple indentical lookups required from table array

    Hi Dilipandey,

    Well, I have been messing around with your latest spreadsheet for the last 3 hours and I haven't had much progress/success. yikes...i am truly an amature.

    I have attached the file that I have been working with. I took your file and added pages etc. because I wasn't able to figure out how to create a dynamic name scenario like your Coldata so I sort of cheated by just using your example.

    Problems - in the true environment that i am going to be using this spreadsheet in, the On Order Copy & Paste sheet is going to have 5 rows of other various information that isn't important to the function (I have just left them as blank for now). As you can see your formula on the On Order Worksheet page doesn't report back the correct information because of the 5 rows that I added on the On Order Copy & Paste sheet.

    Problem 2 - prior to me adding the 5 rows and when your version was untouched, I attempted to copy and paste your formula into cells directly below the ones that you had input. Then I put another number into Column D (or B in the original version) and altered your formula to reflect D6 cell (or B6 cell). Used the control+shift+enter function to implement the {} brackets for the function but nothing seemed to work.

    Please advise on what I am doing wrong.

    Thank you in advance for your assistance once again.

    sincerely,
    tornado
    Attached Files Attached Files

  14. #14
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: multiple indentical lookups required from table array

    Hi Tornado,

    See the attached file where I have done little enhancements to suit your requirement(s). Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

+ 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