Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table lookup and data return? I am in need of help.

Status
Not open for further replies.

DanEvansJr

Programmer
Aug 17, 2001
41
US
First, let me say that I know very little about Excel formulas and complex scripting and such, so feel free to dumb it down for me. I won't be offended. I'll be greatful.

Someone in my office is trying to do something and they came to me for assistance. I told him that I had no idea, but I would do some research and figured it couldn't hurt to come here and see if I could get the answer(s). Here's the jist of it:

Table 1
Col 1 | Col 2
Row 1 xxx-xx-xxxx |
Row 2 xxx-xx-xxxx |
Row 3 xxx-xx-xxxx |
Row 4 xxx-xx-xxxx |
Row 5 xxx-xx-xxxx |
Row 6 xxx-xx-xxxx |
Row 7 xxx-xx-xxxx |


Table 2
Col 1 | Col 2
Row 1 xxx-xx-xxxx | TEXT VALUE 1
Row 2 xxx-xx-xxxx | TEXT VALUE 2
Row 3 xxx-xx-xxxx | TEXT VALUE 3
Row 4 xxx-xx-xxxx | TEXT VALUE 4
Row 5 xxx-xx-xxxx | TEXT VALUE 5
Row 6 xxx-xx-xxxx | TEXT VALUE 6
Row 7 xxx-xx-xxxx | TEXT VALUE 7


Table/sheet 1 contains a column of unique SSN's. Table/sheet 2 contains a column of unique ssn's and more columns of associated data. We would like to write a formula/script/something that can be used to check every value within column 1 of the second sheet and compare it to the single value in column 1 of the first sheet. Basically looking up the SSN. If it is found, then we need to return the value of the column 2 of that found row in the second sheet.


For example: The following is kinda what we're looking for. It pulls the 'TEXT VALUE 5' from the second sheet, because it matched the SSN from column 1 on the primary table to the ssn in column 1 on the secondary table.

Table 1
Col 1 | Col 2
Row 1 099-99-9999 | TEXT VALUE 5
Row 2 xxx-xx-xxxx |
Row 3 xxx-xx-xxxx |
Row 4 xxx-xx-xxxx |
Row 5 xxx-xx-xxxx |
Row 6 xxx-xx-xxxx |
Row 7 xxx-xx-xxxx |


Table 2
Col 1 | Col 2
Row 1 xxx-xx-xxxx | TEXT VALUE 1
Row 2 xxx-xx-xxxx | TEXT VALUE 2
Row 3 xxx-xx-xxxx | TEXT VALUE 3
Row 4 xxx-xx-xxxx | TEXT VALUE 4
Row 5 099-99-9999 | TEXT VALUE 5
Row 6 xxx-xx-xxxx | TEXT VALUE 6
Row 7 xxx-xx-xxxx | TEXT VALUE 7


I hope this explaination was good enough. I don't have much more to go on, unfortunately. Any help that anyone can give me would be greatly appreciated. Remember, I'm far from an expert, so speak plain. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top