Solved

Help with Lookup table

Posted on 2013-12-17
9
330 Views
Last Modified: 2013-12-22
Hello,

I'm finding Lookup tables to be really helpful, but I still have some issues getting them to work.

Attached is a sample Excel 2007 file.  Sheet 1 is a list of documents in Column B.   Sheet 2 is another list of documents in Column A, along with additional columns with data that I want to bring to Sheet1.

I need to match the document name on Sheet 2 with the same document name on Sheet1. Then bring from Sheet 2 Columns A, B, C,D & E onto Sheet 1,  putting those columns on Sheet 1 starting at column C,D,E,F,G.

If there is no matching document in Sheet 2 then something needs to go into SHeet 1, I guess at column C saying "No match".

So the end result will be Sheet 1 including what is already in Column 1 and using the document name as the "key", and the matching data from Sheet 2,

Hope I am being clear and  not over explaining what is actually "simple". At least simple for you!

Thanks

Rowby
zap-docman-basics-for-experts-2.xlsx
0
Comment
Question by:Rowby Goren
  • 5
  • 4
9 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 39725608
Here is how you would use vlookup in your situation. For the first ID the formula would be:

=IFERROR(VLOOKUP(B2,rokdownloads!$A$2:$B$15,2,FALSE),"No Match")

IFERROR is used to give you the "No Match" you wanted for records that don't appear on sheet 2. You would just copy that formula down. The next column, display name, would use:

=IFERROR(VLOOKUP(B2,rokdownloads!$A$2:$C$15,3,FALSE),"No Match")

We're just extending the table array by one column. That is what the "3" is before "False". It was "2" for ID and for Path it will be "4".
zap-docman-basics-for-experts-2.xlsx
0
 
LVL 22

Expert Comment

by:Flyster
ID: 39725613
I forgot to mention, the ID's in rows 9 and 10 are the same. This is because the name is the same. On sheet1, column A you have numbers listed that somehow are associated with the name. Those numbers do not appear in sheet2.

Flyster
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39725645
Thanks Flyster.  I will be testing this all out first thing in the morning, when my brain is better in gear.

I'm sure it will work fine!

Rowby
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 9

Author Comment

by:Rowby Goren
ID: 39726667
Hi Flyster,

Just looked at your demo.  Looks good. Let me apply it to my actual document.

Rowby
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39727135
Hmmm.  I added your code to my complete document and when I drag down, with the first formula I get no match.

There really isn't any personal data in my own file, so I am uploading it here.

I tried to match my file with the smaller version I uploaded to EE, but clearly I did something wrong.....

Thanks

Rowby
experts-why-not-working.xlsx
0
 
LVL 22

Expert Comment

by:Flyster
ID: 39728131
The sample given was base on the data you provided, which was 15 rows. Highlight column C, go to the Home tab and under Editing select replace. Replace $B$15 with $B$500. That will cover your current range. If you think your table will grow, you can increase the $B$500 value to fit your needs.
0
 
LVL 22

Expert Comment

by:Flyster
ID: 39728182
This is what it should look like
experts-why-not-working.xlsx
0
 
LVL 9

Author Closing Comment

by:Rowby Goren
ID: 39734963
Thanks Flyster.

Your solution saved me a big headache!

Rowby
0
 
LVL 22

Expert Comment

by:Flyster
ID: 39735096
Glad it worked out for you!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question